Lock-picking robot
By Ben Everard. Posted
This article was originally published as part of HackSpace magazine, which has since been incorporated into Raspberry Pi Official Magazine.
We’ve had a little look at lock-picking back in a past issue of HackSpace (Issue 48). The most important thing we remember from that tutorial is that you must never pick a lock that isn’t yours. The next most important thing is that a Yale-style lock has several pins that must be pushed into place before you turn the lock. Normally you’d do this with a key – the irregular surface of a key is like that because each pin has a different amount of travel before it clicks into place and the barrel of the lock can turn. To open a lock without a key, you need to apply some gentle rotational force to the barrel (usually with a thin piece of springy metal called a tension wrench), and some way of pushing the pins of the lock upwards. The more pins, the harder the lock is to pick. Oh, and many, many locks are trivially easy to pick.
Advertisement
Christmas is coming – keep Santa on the right track with our Raspberry Pi gift guide!
With the basics established, and a thriving community of security-aware hackers out there sharing tips (all in the name of hardening security, of course), it was only a matter of time until someone produced a lock-picking robot. And what a robot! This beauty uses a hollow 3D-printed key blade with five wires running through it, which pop out where you’d expect to find the teeth of a regular key. These push the lock’s pins up while another motor rotates the key blade. There are only so many combinations that are possible, and the robot’s software just cycles through all of these combinations in a physical brute-force attack.

We don’t think many readers will want to replicate this machine – the plastic will most probably fail before the robot has cycled through all the possible pin combinations – but there is one aspect of it that we think all robot makers should think about, and that’s the way it controls rotation. To ensure the machine doesn’t try to rotate the machine while the lock is still closed, which would break the key blade, Sparks and Code has used an optical encoder to give feedback to the stepper motor, which will tell it to stop turning if the lock doesn’t move.
Ben is the Editor of HackSpace magazine. When not wrangling words, he enjoys cycling, gardening, and attempting to identify wild mushrooms.
Subscribe to Raspberry Pi Official Magazine
Save up to 37% off the cover price and get a FREE Raspberry Pi Pico 2 W with a subscription to Raspberry Pi Official Magazine.
More articles
Meet Phil Hutchinson: element14 community organiser
Phil has always been “the technical guy”
Read more →
M314 Alien Motion Tracker
Game over, man. Game over. It’s the ultimate tracker from Aliens.
Read more →
Christmas Gift Guide in Raspberry Pi Official Magazine 160
There’s a ton of great stuff in issue 160, including the incredible motion scanner, inspired by the film Aliens. It’s beautiful, it uses Raspberry Pi technology and makes a satisfying ping sound, and the best thing about it is that it actually works, thanks to a DreamHAT+ radar board. Yes, you too can join the […]
Read more →
Sign up to the newsletter
Get every issue delivered directly to your inbox and keep up to date with the latest news, offers, events, and more.