Parametric DIN Rail Bracket Generator
- 9 hours ago
- 4 min read
DIN Rails are an excellent resource for system builders, offering flexible organization for electronics cabinets. Many devices, such as power supplies, relays, and conditioning circuits, can be mounted easily without the need for drilling holes. However, the components that come with these rails often have a premium price. Moreover, adapters are necessary for mounting components that lack a DIN Rail interface. The good news is that if you have access to a 3D printer, you can create your own adapters.
The Model
With this in mind, I created a parametric DIN Rail Bracket model using FreeCAD. It is designed for the standard 35 mm DIN Rail format. Essentially, you simply load the model, adjust a few parameters in a table, and you will have a customized DIN Rail bracket tailored to your requirements.

You can change many aspects of the bracket - the length, height and width for starters. You can place mounting holes on the bracket to match whatever component you want to mount. It also has mounting bosses that allow clearance below the component.
Ensure that FreeCAD V1.1 is installed and use it to open the model I created. I plan to update the model periodically, so it might appear slightly different. After opening the model, you will notice the various components and an item named Bracket Parameters. Click on it to access the parameter table, where you will see this on the left hand side of the window:

Most of the entries should be fairly straightforward. When you modify one (and press enter), the model will update to reflect your change. The minimum length for brackets is 60 mm. For brackets shorter than 70 mm, the lever slot is omitted. You can choose any bracket width, but I have found 8 and 10 mm to be good options. The bracket height should be at least 3 mm, though I prefer 5 mm. The model includes 2 mounting holes centered on the bracket. You can adjust the diameter and depth of the holes to match your fasteners. I prefer M3 screws and have found 2.6 mm to be suitable for my printer (Bambu Labs). Note that 3D printers often produce holes slightly smaller than intended, so you may need to experiment to find the correct diameter. An additional feature is a taper to the holes, which can be helpful for allowing a screw to sit in the hole before it begins engaging with the plastic. I sometimes use a 1-degree taper. If you plan to use heat-set metal thread inserts, ensure the hole size and bracket height are appropriate for that.
Exporting and printing your brackets
Once you have modified the bracket parameters to your liking, the next step is to export your model in a format that is compatible with your Slicer application. Steps:
Click on the "Pocket" entry in the tree in the upper left corner of the FreeCAD screen. This selects the full model. (Yes, a bit of FreeCAD voodoo.)
Click on File/Export to get to the "Export File" panel.
Click on Save Type As and select the "3D Manufacturing Format (*.3mf)".
Navigate to where you want to save the file and name it something appropriate (like "Relay DIN Rail Bracket" for example) and hit save.
You now have a 3D printable file. If you slicer doesn't support the .3mf file format, you can export it as "Step with colors (*.step, *.stp)" which should be supported.
Print the brackets (you will need at least two) on their side. This does not require any support and gives the spring latch the best orientation for strength. One of the features of this model is an angled slot to allow clip release with a small flat-bladed screwdriver. You will want the slot on the outside of the component/brackets assembly, so you will need to print one of the brackets mirrored. Most slicer applications support this. In Bambu Studio, it is a right-click on the object and select mirror.
For material, you can use anything you want, though good old PLA is perfectly fine for most environments. PETG will withstand a bit higher temperature, so you may want to use that if your cabinet is subject to more heat.
Using the brackets
Mount your component on the brackets with fasteners of your choice. Note that the brackets have 2 clips that allow you to snap the brackets onto the rail and hold it firmly in place. You place one side (the hook) on the rail and press the other side (the retaining clip) down to latch it onto the rail. To release the bracket from the rail, use a small flat bladed screwdriver in the lever slot to pry ack the retaining clip.

See the drawing for how this works.

The Model
Attribution
The FreeCAD model is an adaptation of an earlier model shared by kc2zgu @kc2zgu_323229 on Printables.
About Me.

I'm Phil Barrett, a long time CNC enthusiast. I run a small company, Brookwood Design, that makes several breakout boards for grblHAL and love to help people get the most out of their CNC machines.






























Comments