A few years ago,Donfire and I built a prototype NFC door lock for a standard British UPVC door. It’s been running reliably for four years, but now we’re looking to refine the design.
It’s a pancake stepper motor coupled to the thumb-turn axle of a euro cylinder lock barrel. It rotates upon receiving the correct UID via a PN532 or RC522 NFC reader, and can be used conventionally with a key.
While the system works perfectly, the prototype is made of stacked modules, which makes it look janky. our goal is to redesign it by combining the modules into a single PCB that directly fits onto the motor. Reduces the overall footprint and simplifies installation for a cleaner, more professional looking result.
The code is complete and functioning as intended for the new hardware. All modules and ICs have been dissected from the datasheets and incorporated into a single schematic.
Its at this point i tell you that I’d classify myself as an amateur who’s learned through YouTube tutorials, and the amazingly patient community here, i have no background in this industry and am doing this for my own personal benefit, so before I send the design to China for production, I’d love for more experienced eyes to review it for any mistakes or potential improvements. Specifically:
Schematic Check: Are there any issues with the way I’ve incorporated the modules?
Component Verification: Do the selected components match my use case, or are there better alternatives?
PCB Layout Review: Is the trace routing and component placement optimal?
I’m incredibly grateful for the help and support I’ve received so far from the community. If you’re willing to take a look at the project, I’d greatly appreciate your feedback!
I use kicad for all my designs however the concept is the same.
I’m seeing a lot of Via’s with no traces leading to them. I’m assuming these are going to a ground plane? Where do the other side of these components go?
See in Kicad you have to run each pad to the via directly using a trace. So looking at it and not seeing that trace going to the via to the groundplane kinda made me worry since i see a lot like that. like almost every component. Because i see the via there, i just see nothing connecting to it from either the front copper or the back copper.
THAT IS ALOT OF COPPER. and as a result you are creating a lot of “parasitic capacetence”
I can see using a full ground plane but in your current setup your entire top and bottom unused areas are full ground planes. I guess i wasnt realizing how basically all of the board is copper. I guess this will work but you likely will have 2-3nf of capacetence if not more added to each component that hits your ground plane.
Note that i am by no means an EE and someone with that knowledge could chime in. Just with my amature knowledge i feel like you should have one layer dedicated to be your ground plane and keep the amount of copper limited to it.
Here are a few things I would check, note: I have some experience with PCB design but I’m not really a professional… and also some of those are more “good practice”, your board will work without them but it’s just not ideal:
Buzzer directly connected to ATTiny1616. The datasheet for the buzzer specifies a maximum current of 110mA which is a lot. The ATTiny1616’s absolute maximum I/O pin sink/source current rating is 40mA. The solution is simple, just use a transistor or mosfet
Below R14 and R13 you have some ground fill not connected to anything. In the case of something like this it’s not really a big issue but a good practice is to either put a via at the end or just remove the ground plane there, to prevent it from acting like an antenna… Same on the top left corner of the board.
those are some really beefy motor traces! Not really an issue, just somewhat overkill when the 12V input trace is narrower
Stray little ground “trace” that’s actually a fill on pin 3 of the motor driver.
Right hand side of the board could use some vias to connect the top and bottom ground planes together.
Placement of the 3.3V regulator and the ATtiny is not great. The 3.3V rail runs across the entire board, and to make things worse, runs below one of the traces for the motor. Easy fix: run the trace across the other side of the cutout, better fix: move the ATTiny and regulator closer if possible.
Control signals to the motor driver also run under motor traces, again not great.
Try moving the inductor for the regulator (U21) to the right and minimize the loop. Even better, check the datasheet, and try following the recommended layout on page 19. Your layout is probably going to work since there’s not a huge load on it but it’s nice to do things right. Here’s a video about this… it’s in japanese but has english subtitles. Here’s an english one too https://www.youtube.com/watch?v=6AEUxY9QipI
some amazing feed back there, i really appreciate the time you have taken so far to look over the pcb, i will implement your recommendations, as for the attiny1616… it was cheap and and small .The pcb was alot more populated in its infancy. we toyed with a few ideas then when i saw the manufacturing costs, it got alot simpler, now we have a bit more space.