Blueprint

Combination Lock Cracker

A device that cracks any masterlock-shaped combination lock.

Created by Shaan Shaan

154 views

0 followers

Timeline

Shaan Shaan added to the journal ago

Updated stepper wiring

image

Fixed a few issues with my stepper driver wiring and updated the PCB. Everything should be all done now

image

I'm going to finish up the BOM on the weekend and I should be able to ship this soon

Shaan Shaan added to the journal ago

Finished 3D Design

I added holes for each port to be accessed from outside the box, and I added some dividers between terminal blocks to better organize each wires in their category.

image

To access the inside I made the top cover removable with screws
image

Lastly I also added some mounting screws to secure the lock holder and the sliding mechanism in place
image

Now I'm going to work on my BOM, and I'll also get my schematic checked one last time specifically for the wiring of the driver since I want to make sure I got it correct.

Shaan Shaan added to the journal ago

Added the PCB and Driver

image

I put the PCB and the driver in the most logical spots I could think of and I added mounting screws and supports for both. I also created holes for the connectors to fit the wiring through.

image
image

Now I'm going to be adding more cable organizers on the inside and I should be done the 3D modelling.

Shaan Shaan added to the journal ago

Finished main design

Added the base with the LCD and the Keypad. All thats left now is to create create the 3D model of my PCB and driver, then find places for them in the design

image

Shaan Shaan added to the journal ago

Remade design

Since I was using bad practices to make my previous design I ended up messing up my entire project's timeline and features which I couldn't fix without doing extra hours of work. I figuired it would be easier to redo the whole project (which now only took a fraction of the time since I know what I'm doing now).

Here are some additional changes I made:

Added more support/mounting screws
Base + Servo Bracket is smaller
Remade the lock holder so there's less lock slippage and the lock can be removed easier.

image

Shaan Shaan added to the journal ago

Created lock removal mechanism

Made a sliding motor assembly with a locking pin to easily access the combination lock at all times by just removing the pin and pushing the motor back

image

image

image

Now that I learned more about joints and contact sets in fusion, I'm going to do the same with my servo setup so I can simulate the gears/shackle opening too.

Shaan Shaan added to the journal ago

Created Keypad

image

Finished creating keypad and added a bracket for it + a bracket for the LCD. Most of my time was spent trying to separate my parts again because Fusion keeps grouping them together for some reason.

My current idea for changing out the locks is having a way you can pull the stepper motor back to be able to access the lock

Shaan Shaan added to the journal ago

Created Servo Mount

Finished creating the servo mount/bracket

image

I couldn't find a 3D model of my exact keypad online so now I have to make my own. After creating that and setting up all the wiring + screws I think this project will finally be finished.
image

Shaan Shaan added to the journal ago

Created lock opening mechanism

  • Made the shackle opener
  • image

  • Attached teeth to the rack and attached it to the servo

  • image

  • image

  • Created the bracket to keep the rack in place (also extended the rack a bit)

  • image
    I'm probably going to create an indent on the walls of the rack where the rack can slide against the bracket to properly secure it.

Shaan Shaan added to the journal ago

Created the base structure

I decided that I'm going to hide the driver and my PCB underneath the structure to make things look more clean, and embed the LCD and keypad onto the front of the opener.

Instead of using a regular servo horn, I switched it out with a gear + rack system so it's more stable and it'll be more accurate when detecting shackle movement.

Next steps:

  • Create the gear and servo supports
  • Find/Create a 3D model for the keypad
  • Create the 3D model of my PCB
  • Have a place where all the wires can get routed through (the driver's power & control cables will be routed separately to avoid interference)

image

Shaan Shaan added to the journal ago

Rough Idea on 3D model

I got a good start on the CAD so far

image

Now of course this isn't the final design, but it's what I'm going to start with. I'm planning on adding the LCD and keypad to the side of it, and have the driver and PCB on the back or even at the bottom.

My main concerns are having proper clearances so components arent too tight/loose, and a way to easily swap out locks with minimal hassle/tools.

Shaan Shaan added to the journal ago

Designed Keypad Holder

Got all the measurements for the keypad and finished a rough version for the LCD + Keypad holder.

image

Now I'm going to create the main base. It will hold the lock, motor, driver, and servo. Then after that I'll attach the LCD and Keypad to it, add my custom PCB, then put everything together.

Shaan Shaan added to the journal ago

Finished PCB

  • Routed the GPIO0 - GPIO3 traces underneath the main chip instead of over, so it doesn't interfere with the USBD lines.
  • GPIO26_ADC0 also got routed through the chip for the same reason.
  • Moved the 5v/3v3 converter to the left side of the USBD lines to make it more distinguishable from the other power components

Now that I'm finished the PCB, I'm going to start working on the 3D models.

image.png

Shaan Shaan added to the journal ago

Waiting for review

I've finished up on fixing all the issues and now all that's left to do is to wait and get some more reviews in

  • Moved around the traces and component arrangement so that it's a bit cleaner

image.png

Shaan Shaan added to the journal ago

aaaaaaaaaaaaaaaaa

This stupid little trace is not connecting for some reason and I have been spending the last 30 minutes trying to figure out why. I redrew the lines next to it a million times and tried to reroute it and nothing.

image.png

Turns out it was this because of the trace on it's right popping out a little

Dont see it?
image.png

image.png

image.png

image.png

Shaan Shaan added to the journal ago

Fixing PCB #2

My old traces were very thin so I had to change all of them to 0.2mm, along with changing the minimum clearances and stuff. All of this could've been avoided if I didn't design my board using the wrong settings 🥀

I also moved the MCU down a bit for extra room.

image.png

Shaan Shaan added to the journal ago

Fixing some PCB stuff

Since your not supposed to use vias inside pads unless they're capped (which I have to pay extra) I went ahead and fixed all those occurences.

I also changed the thickness of the 24V traces to 0.3mm since I rounded up the calculation that I got

image.png

The top of my PCB is really crammed so I'm going to go ahead and move the MCU and it's components a little further down too.

Shaan Shaan added to the journal ago

Finished PCB

I finally got rid of all the DRC errors 🥳
image.png

I tried my best to organize and fit all the silkscreen labels, but because there's a very compact area between the chip and power I couldn't keep all of them and ended up removing the ones that wouldn't fit.

image.png

image.png

Now it's time to get some reviews on the PCB

Shaan Shaan added to the journal ago

Routed the PCB

Here is the semi-final version of my PCB. All I need to adjust now are all the fabrication and silkscreen labels, then I need to see if I'm able to make the board smaller.

I also filleted the edges and moved around some components to make sure everything fit in the board.

image.png

Oh yeah, the DRC is pretty mad so I gotta take care of that too.
image.png

image.png

Shaan Shaan added to the journal ago

Small update

Busy with work so I can't put as much time as I'd like to on my project, but heres some things I did.

Changes:

  • Switched the flash memory for a smaller version (W25Q128JVS -> W25Q16JVZPIQ TR) image.png image.png
  • Routed some of the PCB image.png
  • Changed mounting holes from M3 -> M2

After finishing up the board again I will try and make it as small as possible with interfering with anything.

Shaan Shaan added to the journal ago

Ready to start PCB (again)

I finally found some parts on JLCPCB which also had a footprint(a Phoenix terminal block footprint with the same dimensions) on KiCad, now I'm going to redo my entire pcb to make it way smaller than before.

image.png

image.png

My only challenge now is figuring out how to lay out the parts without making my pcb too crammed and ugly looking.

Shaan Shaan added to the journal ago

Finding viable terminal blocks

Okay I think I'm actually done schematic-side now. image.png

Right now the biggest issue that im facing is finding a viable terminal block connector since I just used random footprints last time. The connector should have a footprint (or enough details on the datasheet to accurately make one), and is available at JLCPCB. I gone through like 20 so far and none of them fit my needs so far.

Shaan Shaan added to the journal ago

Changed the transistors

Since the transistor was bigger than I thought, I moved to a SMD equivalent of it. I got the gist of routing and now I need to make my pcb way smaller too. Since the terminal blocks are taking up a huge chunk of my space I need to split them up across the board instead of having them all in one line.

Old transistor(left) vs new transistor(right)
image.png

Also added some placeholder functions in the code:
image.png

Shaan Shaan added to the journal ago

Schematic Revisions #3

Turns out the module I was using as a logic level shifter is not open collector, which is what the motor driver's datasheet recommends, so now I need to find an alternative.

I looked into the SN7407 and the 74LS07 and favoured the ladder since it already have a symbol in KiCad ready, which the other did not.

Eventually I just ended up with using transistors + resistors for the space and cost savings it provides for basically the same thing.

Since the datasheet for my driver is pretty bad it took some time to understand it all. I tied my positives to +5V and used the negatives as signals.
image.png

image.png

Shaan Shaan added to the journal ago

Got some routing done on the PCB

Routed most of the PCB, all thats left now is routing the connectors. I also changed the old footprint of the inductor for my 24v/5v buck converter, since I built the one one wrong and it was missing a pad, heres the new footprintimage.png

image.png

I also need to get my stepper driver connector's wiring looked at since I'm pretty sure it's wrong.
image.png

Shaan Shaan added to the journal ago

Design Updates

When I was setting up the PCB I realized that I had two of the same connectors for each peripheral. I removed both the 1x20 pin headers since they were just duplicates and I didn't plan on needing the extra IO pins anyways.

Also I realized that my capacitors for my RP2040 were powered by 5v instead of 3v3, so I had to change that too
image.png

Now I need to make my board smaller and make a few more adjustments before I start routing.
image.png

Shaan Shaan added to the journal ago

Started the PCB

Going ahead with the PCB designing now. Haven't figured out an idea of how the board should look in the end, so for now I'm just grouping the parts on the board. I guess this is a good time to look back on the devboard tutorial and see how Kai did his in the devboard tutorial.
image.png

Shaan Shaan added to the journal ago

Schematic revisions #2

Just kidding, turns out I have more things to fix.

  • I got rid of the second buck converter that was used purely for the servo since it wasn't needed, instead added a flyback diode to the servo to protect the circuit from dropping voltage when stalling.
  • Changed out the XL1509 chip for its higher switching frequency(lower ripple) and similar efficiency

image.png
image.png

Everything else looks fine so far, and I finally finished assigning all the footprints after a ton of finding JLCPCB replacements and researching. Now I'll go back to writing the boilerplate code

Shaan Shaan added to the journal ago

Finished Schematic

Okay after some more reviews and revisions I am 99% sure my schematic is fully finished now. Now I want a little break from KiCad so I'm going to finish up writing the code and then start PCB designing.

Schematic updates:

  • Added mounting holes
  • Added PWR_FLAGS to GND and +24v, VBUS, +5V, and +5V Servo
  • Fixed random pin layouts and properly grouped them together on the connecters
  • Changed the Analog Feedback servo, I2C LCD, and the Matrix Keypad symbols to connectors since they are going to be connected with wires instead of directly being on the board.
  • Fixed the barrel jack's reverse polarity protection. Before: image.png After: image.png

Shaan Shaan added to the journal ago

Set up VSCode

I downloaded the Raspberry Pi Pico vscode extension and initialized my project in C. For now, I'm just going to create some very basic code with library imports and the rest will be comments of what things should be doing and how it would be structured since I don't have my project yet.

image.png

Shaan Shaan added to the journal ago

Schematic revisions #1

I got some advice on my schematic now I got some things to improve on. I implemented a few so far.

One thing I changed so far is removing the motor and encoder symbols entirely, since they are not apart of the pcb they don't need to be in the schematic.
image.png

With that I also replaced the stepper driver with terminal block connectors, since the driver isn't going to be directly attached to the board but will still be connected with wires.

I also read the datasheet for my logic level shifter and realized I was missing the 10k resistors on the unused pins, so I added that too.
image.png

My last change of today was changing all the global labels to hierarchial labels for better schematic practices.

Old:
image.png
New:
image.png

Shaan Shaan added to the journal ago

Finished Schematics

I finally finished my third and last schematic sheet. I fixed some small issues with my other sheets and organizing my sheets with textboxes and some labels. Now I'm going to get them reviewed before I go ahead and start designing the PCB.
The hardest part of this process so far was finding available parts on JLCPCB that would work for my board. I spent a little over an hour on reading datasheets and researching.

In the end I'm also going to try using some simulation software like Ansys to do some final tests on my board before finalizing and ordering my PCB to make sure everything will work as intended once I get all the parts.

For now I'll be watching some more Fusion and PCB design tutorials. Soon I'll start creating the code for my project.

image.png
image.png
image.png

Shaan Shaan added to the journal ago

Finished the main RP2040 schematic sheet

After reading a bit of the Hardware Design with the RP2040 and following some parts of Kai Pereira's guide on creating a devboard I was creating and finishing up on my schematic for the microcontroller. Everything was going good until my PC decided to randomly crash and have me lose most of my progress. The recovery file thing that KiCad has didn't work so I had to redo half of my work again which slowed me down a bit.

Nevertheless I finished the schematic and now all thats left is to create the schematic for all my peripherals then I'll be able to move onto my PCB designing.
image.png

Shaan Shaan added to the journal ago

Created the power schematic

Along with creating a new devboard, I dropped the XL4015 buck converter idea and went ahead with the XL1509 and the MCP1700 modules for my setup to save more space.

The board is going to have 2 sources of power, a USB-C Receptacle, and a Barrel Jack. The USB-C would mainly be used for programming the board but it can also be used to power all the components besides the stepper motor setup. The barrel jack will be the main source of the power for this board, as it provides the 24V necessary for everything to work.

The way I'm going to setup my schematic is with multiple sheets, "Power", "RP2040", and "Peripherals". I decided this would be a good way to keep everything organized and have things easily findable.

image.png

Shaan Shaan added to the journal ago

Created the coupler

Finished created the coupler for my motor & lock. I made teeth on the inside for the dial by measuring out the teeth on my lock as precisely as I could with my ruler since I don't have an electric caliper. The coupler's teeth should be aligned directly with the teeth on the dial so there's minimal slipping and to ensure a good fit.
image.png

Shaan Shaan added to the journal ago

Change of plans

Instead of having an arduino mega + pcb setup, I'm going to go ahead and make my own devboard to both reduce space and to simplify wiring. My top 2 options are currently the RP2040 and the ESP32.

After some consideration, I went ahead and chose the RP2040 module for this project over the ESP32. I liked the ESP32's chip for its wifi capabilities but ultimately chose the RP2040 because it consumes less power and has better overall hardware control. Since I also already have an LCD and Matrix keypad for my project, running a web server would've just been unnecessary overhead.

image.png

Shaan Shaan added to the journal ago

Day 5

New ideas of how my project is going to function

For my servo, I will need to program it in a way that helps prevent excess damage by hitting the shackle full force every time. Cutting power as soon as it detects the servo hits a lot of resistance, and adding a capacitor to the servo are some ideas I have right now.
image.png

The design also needs good cooling, especially for the buck converters, so I need some additional heatsinks for that too.

Currently working on/plan for the day

  • Schematic for the project
  • Creating footprints and symbols for the parts
  • Making the coupler for the motor and for the dial
  • The part that will hold the lock securely in place

image.png

Shaan Shaan added to the journal ago

Creating mounts

My current plan is to create mounts for each similar part (Keypad + LCD, Motor + Lock, etc), then I'll group them all together into one final design. I'm not that experienced in 3D modelling, so theres probably a better way to do this.

image.png

The past hour or so I've been downloading all the 3D models of the parts that I'm going to use in my project, organising my project directory, and making the LCD mount. Now I'm in the process of adding the keypad.

image.png
Still haven't really figured out the screws in Fusion yet

I want my final design to allow for the lock to be easily swappable, keep the entire thing compact, while still being able to see the action. Similar to something like this
image.png

Shaan Shaan added to the journal ago

Created a 3D lock model

I created my combination lock model in Fusion 360. I found the dimensions of my specific lock online, but there were some missing measurements like for the dial and width of the lock so I had to measure the parts with a ruler. I'm not gonna make it super polished and good looking just yet, I just want the base idea of how everything will pan out.

I could've finished this model in less than an hour, but my Fusion kept crashing for some reason which slowed me down.

image.png

Shaan Shaan added to the journal ago

Other considerations

I know I'm going to get a ton of power and speed from my Nema 17 motor, but I have a new concern about if my servo is going to slow down my setup. Considering the servo will have to move very fast, and that it will have to attempt to open the shackle a few hundred or even thousands of times before stopping, I'm also concerned about the durability of the servo, I don't know if it can take that many hits.

I also really need a better name for this device, "Combination Lock Breaker" doesn't really cut it.

Here's a quick recap of what I did for the past hour

  • Created readme file
  • Looked at other designs of combination lock breakers, and demos
  • Drafted new ideas for the future (adding a progress bar, status, etc to the display and creating more input options with the keypad)

Image taken from this video
image.png

Shaan Shaan added to the journal ago

Future Plans

This project is going to take way longer than I thought it would. Probably because this is my first hardware project and I have zero clue what I'm doing.

Anyways, since I'm getting tired of KiCad tutorials, I'll start working on my readme file instead. I need to do more research about my parts so I can find where I should put the capacitors and fuses, if I even need them in some areas.

An issue I currently have is that I need a multimeter to properly adjust the potentiometers on my XL4015 step down converters, which I don't have. I'll probably borrow one when needed.

image.png
image.png

Shaan Shaan added to the journal ago

Part Updates + Installed KiCad

  • Finished the BOM for now (not including PCB or 3D printing costs yet)
  • I replaced the stepper motor, encoder, and driver with an enclosed system I found on StepperOnline.ca. This not only simplified half the project for me, it was a couple bucks cheaper than my old parts too.
  • Since I need more power for my new stepper motor, I will be using a 24V wall adapter with DC pigtails: female to project, male to Arduino.
  • I'm also going to use 2 buck/step-down converters now, one will supply 7–12V to the Arduino's DC port, and the other will supply 5V to the other parts.
  • I'm using a separate step down converter for the servo to handle voltage and current spikes when it hits the lock's shackle, which is also why I can't power it using the arduinos 5V pin as it has a chance to damage the board.

For now I'll be following some tutorials on KiCad. Once I'm comfortable, I will start to make the designs for my project.

[24V Wall Adapter] ---------> [Stepper Driver] > [Stepper Motor + Encoder]
                            |
                            ---------> [Step-Down 9V] -> [Arduino Mega]
                                                            |
                                                            [5V Pin] --> [LCD Display]

[24V Wall Adapter] -----> [Step-Down 5V]
                                |
                                --> [Analog Feedback Servo]

image.png

Shaan Shaan added to the journal ago

Rough idea on things

  • For my parts, I decided to switch out the voltage regulator for a buck converter. I did this because a buck converter has better efficiency and is better at heat management.
  • I'm also switching out the arduino nano for a arduino mega since the nano doesn't have enough pins for the amount of wires I need to hook up to it, and the extra specs that the mega would give me would prevent any low memory issues I could run into in the future.

  • Added Ceramic and Electrolytic capacitors

  • Added Fuses

Here's a CirkitDesigner diagram I'm working on for now. (The design isn't complete yet and isn't 100% accurate). Next, I'm going to learn KiCad for schematic and PCB Designs

circuit_image.png

Shaan Shaan added to the journal ago

Part Planning & Research

Spent a few hours researching what parts I mainly need and what goes together.

  • Arduino Nano (Main control module)
  • Double Shaft Stepper Motor (Turns the dial, dual shaft so I can mount an encoder at the back)
  • Optical Rotary Encoder (Allows for even more precise control, and accounts for missed steps, etc)
  • Stepper Motor Driver (Module controlling the stepper motor)
  • Voltage Regulator (Regulates the 5v to the analog feedback servo)
  • Analog Feedback Servo (Opens the shaft)
  • LCD Display (Shows you the interface)
  • Matrix Keypad (Lets you interact with the interface)

I also would like to see if making my own pcb for this project is possible, I'll do some more research.

Next I'll need to find cheap but good parts, add any missing things needed, and calculate the total price, then I will move onto designing the project.

image.png

Shaan Shaan started Combination Lock Cracker ago