Servo Automated Air Inlet/Outlet

This is a servo automated air inlet/outlet which can be used e.g. for an enclosure
35
138
1
1124
updated November 24, 2025

Description

PDF

Hey guys, so in the last few days I have designed and successfully tested an air inlet/outlet which I will use in my 3d printer enclosure for controlling the amount of fresh (and cooler) air coming into the enclosure by sending a signal to a cheap MG90S Servo motor from a Raspberry Pi. The whole mechanism will probably cost you around 25€ → see parts list for more details

Happy printing!

 


The inlet/outlet uses a standard MG90S Servo motor with a gear ratio of 4.46 so that it can completely open and close with such a motor. The smaller gear with 24 teeth is directly attached to the servo motor which then drives the larger gear with the blades attached to it. These blades can control the size of gap in the main body which let air from one side pass through the other side, depending on the differential pressure of both sides (example: higher ambient pressure outside of enclosure and lower pressure inside enclosure → draws in air). The servo needs to rotate about 110 degrees in order to close the gaps completely to stop air passing through. However, due to manufacturing tolerances and a not used seal there can still pass a small amount of air from one side to the other side. Maybe at some point in the future, I will make a second version of it which is better sealed when the gaps are closed.

Since this model has also an additional front plate, where the dust grid gets attached to, you can use literally any wall thickness where the inlet/outlet gets attached to. Only the screws need to be long enough in order to flange the front plate on one side and the main mechanism with the servo to the other. I personally am using 3mm scratch resistant acrylic glass for my enclosure.

 

Explanation of usage:


With my enclosure I am going to use two of these air inlets mounted on one side of my enclosure with an ALVEO3D Fan and Filter on the other side. This allows me to control the incoming cooler air flow depending on the type of filament I want to use. I can close the inlets when I want to print with ASA/ABS or Nylon (require hire ambient temperature) or open the inlets when I want to print PLA or PETG (require lower ambient temperature).
I am using two of these Inlets since I want to distribute the air flow around the heated bed to prevent warping due to airflow. The Fan and Filter are mounted on the opposite side right in the upper middle.

 

Print Instructions:


For printing this mechanism you can use normal PETG or any other material which has a higher melting temperature than the temperature inside or outside of the enclosure. I used PETG CF for the Gears but normal PETG would also work. For the gear with 24 teeth you will need a 0.25mm nozzle in order to print the small details for the inner gears which directly attaches to the motor shaft. Maybe you can also just tighten the screw more to hold the gear in place but this is definitely not recommended since it does not have a form-fit connection anymore and can much easier shake free and rotate → position of the blades are lost. 
For printing the large gear you should pay attention to the print orientation and using supports (as described in an attached picture above). Otherwise you can use normal print setting but with 3 walls and at least 15% infill. Layer height of gears should be at least 0.15mm and for the other bodies just pick whatever you prefer. I printed the other bodies with 0.2mmm

 

Assembly Instructions:


  1. Print every part and make sure you got every component that is on the excel list attached to this printable article

  2. Clean the printed parts properly, especially at those places where the two bearings in the main body get attached to and where the gears will move along.
     
  3. Press all heated inserts on the two sides of the main body and the motor cover
     
  4. Place in the bearing. Depending on the accuracy of your printer you might need a little bit of force to push them in place
     
  5. Solder the JST XH-3 Connector with the motor inside the motor cover in place. This could be a little tricky since you do not have that much space inside that motor cover, I know. I also needed a couple of minutes for that. In order to keep everything small and not bulky I did not want to make the cover larger. But at some point you will achieve a properly soldered connection, don't worry ;)  Ah and maybe use some kind of glue (maybe simple hot glue) to fix the cables in place, just to be sure.
     
  6. Since I also provided a step file here, you can also make another cutout for the standard Jumper Connector or whatever type of connector you want to use.
     
  7. In this step you can slide the motor through the lid and attach the motor cover with two M3x8 screws
     
  8. Now it is time to attach the small 24 teeth gear to the motor shaft. In case you might wonder with what type of screw you attach this gear to the motor, since this screw is not listed on the part list, use the screw that is usually provided with your servo motor right away. Or just use a small M2 or M2.5 screw, depending on the thread inside the motor shaft.
     
  9. Now place the small gear with the motor inside the bearing on the side. Since there is not that much space you might need a few attempts to put it in place, but it will work at some point! Screw the motor in place with the two M2.5x6 screws.
     
  10. Wuhu, you finished the most trickiest parts of the assembly now. You can now put the large gear in place which should be lining up with the cutouts in the main assembly so that the inlet/outlet is fully opened but also with the smaller gear. Use the only M3x10 screw to fix that large gear in place but do not tighten the screw to much, otherwise there might be too much resistance for the servo motor to turn the large gear.
     
  11. Now you can close the lid and attach it with the remaining M3x8 screws.
     
  12. Just to be sure you can test the whole mechanism by sending suitable PWM pulses to the servo or just wait for that until you finish your assembly. For programming the servo with NodeRed, just scroll down and paste in the mentioned code in NodeRed.
     
  13. Last but not least attach the mechanism assembly on one side of your wall (or wherever you mount it) and the front plate with the dust cover inside the recess of it to the other side. Depending on the size of your wall or the length of your arms, a second person might be useful to hold the assembly while the other one connects those two pieces with the last remaining 4 M3x8 screws together.
     
  14. Finally you're, finished with the build. You can now either program the behaviour of the inlet/outlet and and therefore the servo or if you did that already just lean back and relax or get some other project going :D

 

 


Servo Motor Signal Description:


To programm the behaviour of the Servo motor, several systems can be used and are described in the internet: Arduiono, Raspberry Pi, ...
In my case I have a Raspberry Pi using Node Red and giving PWM output signals through the GPIO Pins of the Raspberry.
In the following you can find a description for Node Red and the code for it:
 

  • Brown Cable: Ground
    Red Cable: 5V
    Orange Cable: PWM Data in

  • Possible PWM Raspberry Pi GPIO's could be:
    GPIO: 17,27,22,5,6,26,,23,24,25,16
  • The servo uses PWM signals of 50 Hz with specific period length as follows:
  • Pulse widths ranging from 2%-12% duty cycle
    0% means resetting the PWM value so that the servo does not wiggle around
  • The percentage in node red is just simply used as numbers
  • 2% means to rotate to 0°
    7% means to rotate to 90°
    12% means to rotate to 180°
  • Therefore 5%/90deg= 0.0555 equals 1deg
  • For the air inlet we only need:
    - 2 for 0deg which means inlet open
    - 8.56 for 120 deg which means inlet closed
  • But! After the position command was sent, the percentage must be set again to 0 after a very short amount of time (about 250ms), so that the servo does not jiggle around!
     

JSON Code for Node Red (just import this code in NodeRed):

[
    {
        "id": "93025ed67f8d92b8",
        "type": "group",
        "z": "33200b4a00ded245",
        "style": {
            "stroke": "#333333",
            "stroke-opacity": "1",
            "fill": "#181818",
            "fill-opacity": "0.5",
            "label": true,
            "label-position": "nw",
            "color": "#cccccc"
        },
        "nodes": [
            "1a35f33258c3603d",
            "2bf077c84fe63fea",
            "f6fe99833c282bcf",
            "4b03145a3a3add9c",
            "e9e88fd42806f1c7"
        ],
        "x": 54,
        "y": 579,
        "w": 732,
        "h": 242
    },
    {
        "id": "1a35f33258c3603d",
        "type": "rpi-gpio out",
        "z": "33200b4a00ded245",
        "g": "93025ed67f8d92b8",
        "name": "",
        "pin": "18",
        "set": "",
        "level": "0",
        "freq": "50",
        "out": "pwm",
        "bcm": true,
        "x": 700,
        "y": 780,
        "wires": []
    },
    {
        "id": "2bf077c84fe63fea",
        "type": "ui_button",
        "z": "33200b4a00ded245",
        "g": "93025ed67f8d92b8",
        "name": "",
        "group": "be45fdc8a792ea1e",
        "order": 5,
        "width": 3,
        "height": 2,
        "passthru": false,
        "label": "Open Air Inlets",
        "tooltip": "",
        "color": "",
        "bgcolor": "transparent",
        "className": "",
        "icon": "fullscreen",
        "payload": "2",
        "payloadType": "num",
        "topic": "topic",
        "topicType": "msg",
        "x": 200,
        "y": 700,
        "wires": [
            [
                "f6fe99833c282bcf"
            ]
        ]
    },
    {
        "id": "f6fe99833c282bcf",
        "type": "trigger",
        "z": "33200b4a00ded245",
        "g": "93025ed67f8d92b8",
        "name": "Reset PWM",
        "op1": "",
        "op2": "0",
        "op1type": "pay",
        "op2type": "num",
        "duration": "250",
        "extend": false,
        "overrideDelay": false,
        "units": "ms",
        "reset": "",
        "bytopic": "all",
        "topic": "topic",
        "outputs": 1,
        "x": 530,
        "y": 780,
        "wires": [
            [
                "1a35f33258c3603d"
            ]
        ]
    },
    {
        "id": "4b03145a3a3add9c",
        "type": "ui_button",
        "z": "33200b4a00ded245",
        "g": "93025ed67f8d92b8",
        "name": "",
        "group": "be45fdc8a792ea1e",
        "order": 6,
        "width": 3,
        "height": 2,
        "passthru": false,
        "label": "Close Air Inlets",
        "tooltip": "",
        "color": "",
        "bgcolor": "transparent",
        "className": "",
        "icon": "fullscreen_exit",
        "payload": "8.56",
        "payloadType": "num",
        "topic": "topic",
        "topicType": "msg",
        "x": 200,
        "y": 780,
        "wires": [
            [
                "f6fe99833c282bcf"
            ]
        ]
    },
    {
        "id": "e9e88fd42806f1c7",
        "type": "comment",
        "z": "33200b4a00ded245",
        "g": "93025ed67f8d92b8",
        "name": "Control MG90s Servo Motor for Air Inlet",
        "info": "Product link:\nhttps://www.amazon.de/-/en/AZDelivery-Servo-MG90S-Compatible-Arduino/dp/B086V7TXXC/ref=sr_1_3?crid=2YS8W44UINSDC&dib=eyJ2IjoiMSJ9.j3qIYdRbk0TeiLavaBc-U0ZQVMbK1H3wSWEPJ8sslDMlycrNE_NEcSqbvF5SN3ZMAqTVxn-c9ZqAL5V_PIi8Ha1Mph141QM3KpfETjni7RGRrotJNeIPW3-9W6eE1HlMSdAU5M2x2cJSaby9RGMRUldW6RldT_OfPv12S_58z00ICPB1EP0BCzA15UsGjMp4J8slwEv2n64lrcrLTrGCSVgprJNzptj4djHlREa1immqLOS4HPFRqT28K3m9txOK_UdsLosGPWdlT7bGNjKLsBEuFkvroIKeZ5lyQlZbPvY.L93JQtM0Lz-skY0nD2OI1XEWJrEvXsYWfMSh_z-aZv8&dib_tag=se&keywords=mg90%2Bservo&qid=1711985408&sprefix=mg90%2Bservo%2Caps%2C95&sr=8-3&th=1\n\nBrown Cable: Ground\nRed Cable: 5V\nOrange Cable: PWM Data in\n\n\nPossbile PWM Raspberry Pi GPIO's could be:\nGPIO: 17,27,22,5,6,26,,23,24,25,16\n\nThe servo uses PWM signals of 50 Hz with specific period length as follows:\n\nPulse widths ranging from 2%-12% duty cycle\n0% means resetting the PWM value so that the servo does not wiggle around\n\nThe percentage in node red is just simply used as NUMBERS\n\n2% means to rotate to 0°\n7% means to rotate to 90°\n12% means to rotate to 180°\n\nTherefore 5%/90deg= 0.0555 equals 1deg\n\nFor the air inlet we only need:\n- 2 for 0deg which means inlet open\n- 8.56 for 120 deg which means inlet closed\n\nBut! After the position command was sent, the percentage must be set again to 0 after a very short amount of time (about 250ms),\nso that the servo does not jiggle around!",
        "x": 230,
        "y": 620,
        "wires": []
    },
    {
        "id": "be45fdc8a792ea1e",
        "type": "ui_group",
        "name": "Group 1",
        "tab": "b8e972cea8921967",
        "order": 1,
        "disp": false,
        "width": "11",
        "collapse": false,
        "className": ""
    },
    {
        "id": "b8e972cea8921967",
        "type": "ui_tab",
        "name": "Enclosure Controls",
        "icon": "dashboard",
        "order": 1,
        "disabled": false,
        "hidden": false
    }
]

Tags



Model origin

The author marked this model as their own original creation.

License