Tuesday, 29 September 2026

Using FEA simulation for a custom 3D-printed door lock

When moving into my shared university accommodation, the first thing that I noticed was that the door to the bathroom was lockless, just a metal knob on both sides, with the only security being the trust between flatmates.


At this point, most people would have created a bathroom schedule and timings for showers, to prevent a rather unfortunate accident. However, after considering this, I thought it would be easier to design and 3D model in CAD a custom 3D-printed lock tailored to the doors geometry with FEA analysis to maximise the strength and durability of the parts involved through iterative improvements, then manufacture the prototypes to perform real world tests until a final PETG product can be used long term. I still think I made the right choice.

I started by taking basic measurements of the door. The doorknobs could be unscrewed to reveal a hole in the door, so using a ruler and some calipers, I could get enough information to make a rough sketch.

I used this to 3D model a clamshell that would fit around the door and have some sort of bolt hold it in place. My plan was to use a singular bolt to both hold the lock onto the door and also act as a pivot for the shaft/spindle to rotate around.


I then modelled a very simple shaft/locking mechanism, essentialy just a rectangle with a hole in it that allowed it to be spun around the spindle, which isn't currently shown in the model



I then measured the doorframe, and modelled a very simple clamp that would simply use friction to hold itself to the frame. It would have a slight protrusion in the middle which the grey shaft above would push against to lock.



I then modelled the spindle itself. I planned it to be a rectangular head cylinder with a hole in its opposite end. This would push through the whole assembly, then a small plastic piece would push through the hole to lock it in place, like a cotterpin.


I quickly threw together a model of the door and door frame, then used Revolute and Fastened mates to make an animation demonstrating how this initial prototype would work.


Immediately however, although this looked good as a model, I already had a few doubts on this design. Only 3.5mm of plastic was in use in the actual locking mechanism, such that most of the plastic in this build was not providing structural support to the system. If the door was pushed, there would be a large torque on the plastic bolt, making it a likely failure point, so I decided to revamp the design. 

Instead of using a short shaft and a plastic clamp on the door frame, I replaced it with an extended arm that would lock using a different method of pushing against the inside edge of the doorframe itself. This also eliminated the need for the doorframe clamp, and as a general rule of thumb, less parts is better for any device's reliability

I printed these parts as a prototype and made a few copies just to do some real world strength testing. The initial tests were successful, but very soon I found an issue with the strength of this part. In every single prototype part, the part would break at the exact same point under even light loads; the point where the arm meets the handle.


Just to see if this was a physics issue, or an issue with the PLA prints, I put the model in SimScale and applied a static force of 20N on the flat plate. The simulation instantly showed that there was a huge amount of stress on that specific joint, and relatively little stress anywhere.

In order to spread the stresses out more evenly, a redesign was required. I played around with making certain parts of the arm thicker and increasing infill, until I realised there was a fundamental issue with the geometry of the part. I decided to try adding a base triangle shape to the system, and ended up with the design below.

When this was put in the simulation, a much more even stress distribution is evident. The load from the force on the flat plate is split almost identically through the diagonal truss and the perpendicular arms, such that the point of highest stress on the system is at the hole where the spindle attaches. Since the hole is symmetrical, most of the forces here cancel out anyway, such that adding one truss eliminated all of the strength issues in the arm. I also added fillets and chamfers to smoothen the load transfer between different parts of the assembly.

When put into the assembly, the arm itself looks like this:


And when animated in action, looks like so:


With this fully simulated system, I started printing, and after a few printing errors and setting adjustments, ended up with the final lock:
Shown in locked position, with arm down

 
Shown in locked position without doorframe

Shown from outside side of door

Shown in unlocked position

With all the failed attempts shown below:

Overall, this was a surprisingly interesting project to work through, especially seeing how different the final design ended up being from what I originally modelled. A lot of the process was just designing something, printing it, finding out why it didn't work, and then trying to fix it. Using SimScale alongside the physical testing made it much easier to understand why certain parts were failing, rather than just guessing what needed to change. In the end, the final design worked, and the failed prototypes were just as useful as the final one in showing how designs develop over iteration.



Total cost of PLA: 68p

Total cost: 68p