# Building a Safe Cracking Robot

Pages
Contributors: Nate

## Set Testing

If each three combination attempt takes 10 seconds, what can we reduce the time per attempt? We can dial faster of course. But, we can also get sneaky with how we adjust the dials. It takes me 10 seconds because I can’t back up a digit without fouling where the discs are sitting. The robot can be much more precise.

To crack our safe, we set discs A and B, test the indents on disc C, move backwards to adjust disc B, then test the indents again. We call this set testing as opposed to reset testing (where a full reset is done between tests).

The robot attempts combinations this way:

1. Reset dials by spinning CCW, past zero, continue until we arrive at zero.
2. Continue CCW to 3. This sets disc A to 3.
3. Rotate CW to 3. Continue CW to 0. Disc B is now set to 0.
4. Rotate CCW to the first allowed indent; ours is 8. Disc C is now set to 8.
5. Try the handle. Failed? Continue…
6. Rotate CCW to next allowed indent; ours is 24.
7. Try the handle. Failed? Continue…
8. Rotate CCW to next allowed indent; ours is 66.
9. Try the handle. Failed? Continue…
10. Rotate CCW to next allowed indent; ours is 74.
11. Try the handle. Failed? Continue…
12. Rotate CW to 6. Disc B is now set to 6.
13. Loop to step 4.
14. Rotate CW to 9. Disc B is now set to 9.
15. etc…

Here’s a video of set testing, done by hand, to demonstrate what we’re talking about. Jump to 0:41 to see Set Testing in action.

Using this method we can test the AA/BB/xx combinations (set Disc B to 8 then test four indents) in approximately 8 seconds vs. 40 seconds (4 test @ 10s per test). Much faster!

Originally: 33 * 33 * 40s = 12.1 hours

Using Set Testing: 33 * 33 * 8.3s = 2.5 hours worst case!

And, if we’re confident in our single indent the test time comes down to approximately 4 seconds per test (it’s not linear because of the time to move disc B).

Set Testing with one indent: 33 * 33 * 4s = 1.2 hours.

In 2003, CU student Nate Seidle blew a power supply in his dorm room and, in lieu of a way to order easy replacements, decided to start his own company. Since then, SparkFun has been committed to sustainably helping our world achieve electronics literacy from our headquarters in Boulder, Colorado.

No matter your vision, SparkFun's products and resources are designed to make the world of electronics more accessible. In addition to over 2,000 open source components and widgets, SparkFun offers curriculum, training and online tutorials designed to help demystify the wonderful world of embedded electronics. We're here to help you start something.