From NerdLab Projects
May 9, 2022
Updated at: May 10, 2022
A fun exercise to brute for a master lock combination if you forgot it.
This has been an idea of mine that I have wanted to build ever since forgetting a combo for one of my locks. Yes I know there are ways to limit the amount of combinations down to a manageable amount, but what fun is that?
- 3D printer - I have an old modified Maker select
- Cheap Hobby File Set
- Hatchbox PLA filament (my preferred filament)
- Soldering Iron - I really like the cordless version from Hakko
- Allen wrench - 2.5mm (optional)
- Masterlock combination lock (If you don't have one and want to buy a cheap $3 one)
- Jumper wires
- OLED I2C Display Module
- ELEGOO UNO R3 Board ATmega328P
- MG996R 55g Metal Gear Torque Digital Servo Motor
- 3 buttons/switches (If you dont have these on hand, here is an assortment package.)
- 2x 10k resistors (More resistors than you will ever need here.)
- Perf Board or any bread board
- Cheap stepper motor with driver
- 2x m3 hex bolt and nut - Great variety pack
Very first prototype from years ago that was more or less a fail do to lack of programming/design/building skills
New successful end product
https://www.youtube.com/watch?v=IJM78OVHWlk
After wiring it all up and starting the Arduino, use the right button switch to move the combo until it is on 0. Once there, you will click the other switch to start the decombination. The LCD screen should show which combo it is trying and display the last combo tried if it opens the lock.
Browse to your Arduino sketch directory, and clone this repo into a subdirectory called decombo
, e.g.,
cd ~/Arduino
git clone https://github.com/BluGeni/decombinator.git decombo
Then, launch Arduino, load up the decombo
sketch from your sketchbook, and click "Verify".
Note: VSCode can be configured to have way more passive dev-friendly features for Arduino.
- Pins 2 and 3 are the only pins you can use for interrupts.
- There are 2038 steps per rev in the stepper motor I used - not 2048 like some tutorials said.
- If your stepper motor is not super strong, attempting to open the lock will sometimes move the number a half number.
- Ran into a lot of memory issues with all the combinations as a String array. Fordi helped me solve that.
References: