HowTo: 3D printing – Build a servo-controlled 125mm butterfly valve

I recently built an extraction system for my soldering station and the chamber of my 3D printer.

The built extraction system has two connections. One of them sucks the air out of the 3D printer chamber with the help of a connected hose and thus ensures that the air in it is regularly freed of potential pollutants. Another hose is connected to the other connection. This leads to a soldering station and can therefore be used as an extraction system for soldering fumes.

So that these individual connections can be controlled independently of one another, I was looking for a kind of controllable valve. Unfortunately, I found all commercially available offers to be too expensive or not suitable.

So: do-it-yourself. 🙂

In the following section you can see a few videos of my 3D printable butterfly valve. This is followed by the detailed assembly instructions including a material list.

Simple function test.
Structure including Y distributor.
Example video of an automated setup using a WiFi socket.

Safety instructions

I know the following hints are always a bit annoying and seem unnecessary. But unfortunately, many people who knew it "better" from carelessness lost their eyes, fingers or other things or hurt themselves. In comparison, a loss of data is almost not worth mentioning, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Even the coolest project is worth no injury or other annoyance.

Affiliate links / advertising links

The links to online stores listed here are so-called affiliate links. If you click on such an affiliate link and store via this link, receives a commission from the online store or provider concerned. The price doesn't change for you. If you do your purchases via these links, you will support in being able to offer further useful projects in the future. 🙂


Helpful Articles:
You can find additional tips on ESPEasy in the following articles.

Required tools:

Required material:

Collect the parts you need

So that you can start building the valve, you should first look for the parts listed here.

Overview of the required components.

For the construction you need the following parts:

2x housing rings
1x servo bracket
1x servo arm
1x valve flap arm
1x push rod
1 x valve flap
1x valve flap axis clamp
2x 603ZZ ball bearings
4x M3 threaded inserts
8x M3 nut
2x M2x12 countersunk head screw
2x M2 nut
1x M3x50 countersunk screw
1x M3x35 countersunk screw
2x 3mm washers
8x M3x6 countersunk head screw
2x M3x12 countersunk head screws
1x SG90 servo

Another view of the required components.

Another view of the required components.

The STL files for printing can be found under the following link. If you get an error when importing into your slicer, you should download the complete repository. When downloading the individual STL file, GitHub often only provides the HTML file for previewing the STL file and not the STL file itself.

Information about printing: I printed all components with 30% infill and 5 perimeters made of PLA.

Screw the housing rings together

The case consists of two 3D printed identical rings. These are screwed together to build.

For the assembly you need the parts shown on the left.

Additional view of the required screw parts.

To assemble you should now put the rings on top of each other as shown and use …

… one of the M3 screws to screw them together.

So that it doesn't fall out again, you should screw the screw on the underside with an M3 nut.

Repeat this for all eight possibilities for screwing the two rings together.

Close-up view of one of the M3 nuts used.

Insert the valve flap

After the housing rings are mounted, you can insert the valve flap.

So that the valve flap can be rotatably mounted, you should first use the two 603ZZ ball bearings.

For this purpose, these are inserted into the recesses shown on the inside of the housing rings.

To assemble the valve flap you now need the components shown.

First insert the M3 screws as shown …

… through the valve flap.

Then screw this, including the valve flap clamp, to the underside of the valve flap using two M3 nuts.

Top view of the screwed valve flap.

Side view of the valve flap with mounted valve flap clamp.

So that the axis can later be rotated using the valve flap and properly jammed, an M3 threaded insert must first be inserted into the valve flap.

You can melt this thread insert into the valve flap with the help of a soldering iron until it …

… sits flush in the valve flap.

Close-up view of the flush-melted M3 threaded insert.

Mount the valve flap arm

The valve flap arm is the counterpart to the servo arm. With its help, the valve flap is turned later so that the valve is closed or opened.

You can see the required components in the picture.

First place the M3 threaded insert into the recess in the valve flap arm as shown.

Then you can insert the M3x50 screw into the valve flap arm as shown.

Another view of the prepared valve flap arm.

Another view of the prepared valve flap arm.

In order to clamp the inserted M3x50 screw in the valve flap arm you have to screw the M3x10 screw into the melted-in threaded insert.

Tighten this so firmly that the inserted M3x50 screw is jammed, but the threaded insert does not push out.

You can then use the prepared valve-flap-arm as shown …

… and insert it into the previously inserted 603ZZ ball bearing.

Now put on the 3mm washer and pull the valve flap arm back so far that …

… you can insert the M3x50 screw into the valve flap.

So that you can rotate the underside of the valve flap, you now need...

… an M3x40 countersunk screw and a 3mm washer.

Close-up view of the required M3x30 countersunk screw and 3mm washer.

Now insert it from the illustrated side of the housing ring through the 603ZZ ball bearing. Then you should insert the screw through the 3mm washer and finally into the axis of the valve flap.

Completely assembled, your valve flap should now be rotatable in the housing.

Close-up of the lower axle suspension.

Close-up of the upper axle suspension.

The valve flap arm has so far been inserted into the valve flap so that it can rotate freely. This is only clamped firmly to the valve flap in a further step.

Attach servo

The valve flap can be opened or closed with the help of the SG90 servo. In the following section the servo is mounted on the housing.

For this you need the following parts.

  • SG90 servo
  • 2x 2mm self-tapping screws (usually included with the servo)

First set the servo as shown...

… into the servo bracket.

Make sure that the connecting cable of the servo is not damaged.

As soon as the servo is in the bracket, you can screw it into the bracket with the two 2mm screws.

So that the servo bracket can be screwed to the housing rings, you now need two M3 threaded inserts...

… and insert them into the two recesses.

Then you can mount the servo with the two M3x6 countersunk screws …

… screw onto the housing rings.

Another view of the screwed-on servo bracket.

Connect the servo arm and push rod to the valve flap arm

With the help of the servo arm, the push rod and the valve flap arm, the rotary movement of the servo is transmitted to the valve flap.

For installation you need the following parts.

  • Push rod
  • 2x M2x12 countersunk head screw
  • 2x M2 nut
  • Servo poor

Another view of the required parts.

Now you can screw the previously inserted M3 screw to clamp the M3x50 screw of the valve flap arm. But make sure that...

… the valve flap arm is at a 45° angle to the valve flap. When the valve flap is closed, the valve flap arm should be as shown.

Now you can screw the push rod to the valve flap arm.

To do this, insert the first M2x12 countersunk head screw through the push rod and the valve flap arm.

To do this, insert the first M2x12 countersunk head screw through the push rod and the valve flap arm.

Another view of the screw connection between the push rod and the valve flap arm.

As soon as the push rod is connected to the valve flap arm, you can also connect the opposite side of the push rod to the servo arm.

Make sure beforehand that the servo arm is attached to the servo axis in such a way that the servo still has enough angle of rotation in the opening direction of the valve. This is the only way to open the valve later using the servo.

Position the push rod on the servo arm and screw it...

… as before with the valve flap arm with an M2x12 screw and an M2 nut.

Important: You should definitely secure the M2 nut with a bit of screw locking varnish or hot glue to prevent it from coming off by itself.

As soon as you have everything set up, your valve could look like this. 🙂

Finished construction

In the following paragraph you can see a few more pictures of the finished structure

Mounting options

You can use the following options to mount the valve on a nozzle or to connect it to a 125mm exhaust hose.

Pluggable flange for connecting a 125mm hose

The following flange consists of two halves.

To mount the valve in it, you should mount the first half on the mounting surface.

It is then important that you cut out the mounting surface in the inner diameter of the flange (in the picture, the acrylic sheet). Unfortunately, this cannot be seen in the picture.

Another view.

Then you can mount the valve...

… and attach the second half of the flange and screw it to the mounting surface.

Mounting using a flange

The following mounting option is suitable to mount both 125mm hoses and the butterfly valve built above.

To do this, you should first mount the flange shown on the surface on which the valve will be attached later.

Then you have to prepare the two clamping rings by gluing approx. 5mm thick sealant into the clamping ring.

Then place the first half of the prepared clamping ring around the collar of the flange …

… put the valve on and clamps it with the second half of the clamping ring.

You can then screw the clamping ring halves together with two M3 screws.

Another view of the clamped-on clamping ring halves without valve.

Servo controller PCB for control

To control the valve, I made a circuit board that can control up to 16 servos or valves. Programmed with the ESPEasy firmware and configured accordingly, the servos can also be controlled and automated via MQTT postings.

I will soon put the instructions for assembling the board online and link them here. Until then you can use the option from the next paragraph to control it.

ESPEasy configuration for control

You can use a PCA9685 breakout board to implement another option for controlling the valve servos. If this is connected to a microcontroller (for example the Wemos D1 Mini or ESP8266) via the I2C bus, the microcontroller can control the servos using the PCA9685 breakout board.

To do this, the article ESPEasy – Connect and control the PCA9685 PWM port extension to the ESP8266 describes how you can connect a PCA9685 breakout board to a Wemos D1 Mini and configure it correctly using the ESPEasy firmware.

A little more information about controlling servos using the PCA9685 breakout board can be found in the article ESPEasy - Using a PCA9685 to control servos.

NodeRed Flow for control

If you use a controller that is equipped with the ESPEasy firmware as described above, you can use the following flow as the first start to control the servos.

You can find the flow under the following link. Tips on how to import a flow into your NodeRed instance can be found in the article NodeRed—Importing and exporting node code

In order for this flow to work in your installation, you of course have to adapt the MQTT topic to the name of your ESPEasy instance.

Build a solder fume extraction hose including funnel yourself

In the article 3D printing – Build a solder fume extraction hose incl. funnel, I described a way of building a soldering suction hose from a few standard exhaust air hoses and a few 3D printed parts. All information and required materials can be found in the linked article.

Have fun with the project

I hope everything worked as described. If not or you have any other questions or suggestions, please let me know in the comments. Also, ideas for new projects are always welcome. 🙂

P.S. Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you appreciate that I share this information with you, I would be happy about a small donation to the coffee box. 🙂

Buy Me a Coffee at   


  1. Hi Fab,
    thanks for all your work and the great effort you took to document. Much appreciated.
    We're interesting in creating an automated dust-collection system, using these valves. For that, we also want to use the power consumption of the dust-creating systems, like in one of the videos you showed. To that end: what wifi socket did you use?


    1. Hi Rene,
      I used one of these wifi sockets:
      Important thing here is that they support the tasmota firmware and power measurement. Additionally you should make sure that you dont use this kind of sockets to switch the dust collecting machine on. Even if they can handle the consumed current of bigger machines they often struggle with the high currents during the startup phase of motors. 🙂
      So basically I would recommend to have this socket permanently switched on and use only the power measurement functionality while switching the machine on and off via the stock on/off switch. 🙂
      I can also try to finish the article about this which should include the Node Red source code as well. 🙂
      Best regards

  2. Thanks Fabian!
    I also saw that these smart plugs [ ] have a pinout, that should be usable for the servo directly. You can also easily overwrite their firmware. So you could measure the current of a device, and if it exceeds a limit open the valve and communicate to another device to turn on the valve.
    Secondly, we ordered the 603ZZ bearings (two people independently) and printed the files you provided above and it seems like the indentations are a bit big (at least 0.5-1mm) compared to the bearings. Could it be that you ended up using different bearings or that you uploaded an outdated STL?
    Lastly, a colleague used a piece of continuous M3 threaded rod as the axis for the flap (I guess to replace the M3×30 and ×40) and said it works better for him.

    Thanks for all your great work & Cheers,

    1. Hi René,
      Thanks for the hint. 🙂
      Yes that could be. After switching to an (obviously) more precise 3D printer I also realized that some margins are a bit off.
      Looks like I have to rework the files. I put that on my list. Thanks for the hints. 🙂
      Best regards

  3. Hi Fabian,

    I was putting the the valve together and noticed that in your hardware list you need an SG90 servo.
    In the picture you use an mg90s. During assembly the cable of the sg90 doesn't fit.

    Could you share your source files so I can make some adustments? I will also improve the ballbearing holder and was also thinking of making the valve bottom and upper part a bit thicker so an m3 insert fits in. Connecting the rods works a bit better then.

Kommentar hinterlassen

Your email address will not be published. Erforderliche Felder sind mit * markiert