geekhack

geekhack Projects => Making Stuff Together! => Topic started by: komar007 on Sun, 22 September 2013, 12:23:48

Title: The Living PCB Design Thread
Post by: komar007 on Sun, 22 September 2013, 12:23:48
Let's get it started. I'd like to make this a community-written knowledge base about designing PCBs


Share anything you know about designing electronics: software, tutorials, theory, etc.


Short dictionary

Schematic design
PCB design
Free EDA software:
KiCad
KiCad consists of 2 basic components: eeschema and pcbnew. Eeschema is used to design the schematic which defines how the components are connected. Pcbnew allows you to transform the schematic into the PCB layout.
The basic workflow looks like this:
Eagle
... anybody wants to write a short description?
Title: Re: The Living PCB Design Thread
Post by: komar007 on Sun, 22 September 2013, 12:24:01
Using KiCad

Tutorials
Tips & Tricks
Using Eagle

Books
Title: Re: The Living PCB Design Thread
Post by: komar007 on Sun, 22 September 2013, 12:24:29
Geekhack.org parts library for KiCad


We have a github organization! Check it out: https://github.com/geekhack-org (https://github.com/organizations/geekhack-org)
There is one repository there, so far: https://github.com/geekhack-org/kicad-library (https://github.com/geekhack-org/kicad-library)
If you want to be an admin and need write access, let me know!
For regular contributors: please fork the repository on github, make your commits and send a pull request.
Title: Re: The Living PCB Design Thread
Post by: komar007 on Sun, 22 September 2013, 12:24:42
General electronics design materials

Title: Re: The Living PCB Design Thread
Post by: mkawa on Sun, 22 September 2013, 12:25:07
yay! thanks komar!
Title: Re: The Living PCB Design Thread
Post by: TheFlyingRaccoon on Sun, 22 September 2013, 12:26:14
Thanks for writing this up Komar! I really need to start learning how to design my own PCBs...
Title: Re: The Living PCB Design Thread
Post by: Photekq on Sun, 22 September 2013, 12:44:55
Great! :thumb:
Title: Re: The Living PCB Design Thread
Post by: bueller on Sun, 22 September 2013, 12:47:19
Subscribed. Need to get some PCB designing skills under my belt if I'm ever going to get a 65%  :)
Title: Re: The Living PCB Design Thread
Post by: MOZ on Sun, 22 September 2013, 20:54:09
Thank you so much.

The next logical step for me is to learn PCB designing.
Title: Re: The Living PCB Design Thread
Post by: wcass on Thu, 03 October 2013, 23:50:48
I started learning PCB design a few months ago. I tried out the free versions of Eagle, KiCAD, DesignSpark PCB, and DipTrace.

Eagle seems to be best known one and has been around the longest, but i liked it the least. The UI is not very intuitive but they seem to have the most complete component library. Still it did not have a diode array that i needed for my design. The free version of Eagle is limited to 2 layers and PCB size (4" x 3.2") - too small for what I need. There "hobbyist" and "standard" licenses are size limited too (4" x 6.3) so if you wanted to build a keyboard then you would need the "professional" version - $1640 for Layout+Schematic+Autorouter. I moved on quickly.
 
KiCAD did not feel like it had as big a library, but was more intuitive than Eagle. It feels like it was 3 separate apps stitched together rather than a tightly integrated PCB design package. It did not have the Atmel chip that i wanted to use, but i was able to find it in a library that someone else created and published (sparkfun or adafruit IIRC). I was not able to find a library with my diode array in it, but it was pretty easy to build the footprint. KiCAD is free with no limitations.

The DesignSpark PCB user interface was nice and seemed to me to have the tightest integration. Not quite as intuitive as DipTrace, but more than Eagle. Library size similar to KiCAD. Free with no limitations.

DipTrace was the most intuitive for me. It had the smallest component library, but building components was easy and i hear that it can import components from Eagle libraries. The free version of DipTrace is limited too, but not by PCB size, but by number of signal layers (2 excluding ground and power) and pins (300) so some keyboard designs will work and some will not. Licensed versions are available for higher layer and pin counts, but i don't expect a "hobbyist" would be going above 500 pins ($145) unless they are working on a full sized board with diodes and LEDs on every key.
Title: Re: The Living PCB Design Thread
Post by: mkawa on Fri, 04 October 2013, 05:15:01
doesn't designspark tie you to their fab? expressPCB also has a free piece of design software, but it ties you to their fab. kicad sort of is what it is. it's a weirdly architected, very buggy layout and netlist editor. eagle is the industry standard but has a correspondingly high price tag. even the individual student professional version is 820$.

however, the audio folks have been using eagle anyway for quite a while. there are a couple tricks. first, design onto multiple boards. yes, this is difficult for a keyboard layout, but keyboard layouts are mostly cut and paste, and no one said you had to put the keyboard matrix and the controller on the same board. second, the pricing is set up to get you to buy a number of seats. i am open to banding together under the geekhackers banner to standardize on eagle. at 10 licenses of layout + schem (autorouting = bleh), we're looking at about 340$ per seat. have you seen the pricing on solidworks lately? this is pretty reasonable comparatively.

the really big benefit of eagle is not necessarily how flashy or user friendly it is but just that it's extremely standard, which makes collaboration on a board easier. otherwise, kicad is probably the way to go. diptrace, if it seems to work as well as eagle and is more intuitive to build and use than kicad, hits that same price tier at half the users.

Title: Re: The Living PCB Design Thread
Post by: MOZ on Fri, 04 October 2013, 05:34:34
If we all are going to work on one platform, even if kicad we can build our own library together and that is what really matters, no?
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Fri, 04 October 2013, 07:55:34
I find KiCAD to be a great "product", the developer version is even better. It's great that everything is ascii-files. You can script things if you want to, and do tweaks to footprints with a simple text editor. I have run across a few bugs but I think they have all been taken care of by now. You can submit bugs when you find them https://launchpad.net/kicad. Some times they are handled very promptly, other times they seem to never be "fixed". And you could always contribute by fixing them yourself...

Keyboard PCBs aren't very complex, really. More advanced electronics could perhaps need more advanced tools, I don't know, I haven't been there yet. You want gerber files in the end (anything else is just unacceptable) and the closer to gerbers I am to start with (read text files) the happier I am =)

And you should create your own footprints (or at least check them very carefully) following the specs on the exact parts you intend to use anyway.
Title: Re: The Living PCB Design Thread
Post by: Dubsgalore on Fri, 04 October 2013, 10:14:58
This is really great, just seeing this now, hopefully will be a great useful resource
Title: Re: The Living PCB Design Thread
Post by: komar007 on Fri, 04 October 2013, 11:46:20
It looks like KiCad is missing some good tutorial focused on producing a real thing from the schematic to production.
It really isn't bad piece of software, just unfinished and a bit buggy. It doesn't have some useful features that the expensive programs have, but it certainly does cope pretty well.
As every EDA program, it requires a lot of practice and understanding first, but because of the the way the design process looks, the software can't just let us draw things in a nice and intuitive way. KiCad just requires a bit more of these things than other software because of it's poor integration between the components.
But if you look at how switching between schematic and board is done, it really has everything you need without builtin version control, diffs and binary files. It just requires a little knowledge of the formats it uses and the way things are implemented.
The last drawback is actually a feature for hackers. The files are very easy to edit manually or with scripts in some cases where the software just doesn't cope (yet).

One of the important steps to use any cheap EDA software easily is to understand that you will eventually have to design your own schematic components and footprints. With the number of different packages these days, you'll always at least have to prepare your own footprints, unless the vendor has done that for you (and if they have, it's usually Altium only).
Because the footprint and component drawing capability is pretty sensible in KiCad, the sooner you get used to it, the better.
The second step would be to always put all the libraries and modules to your project's directory instead of relying on the builtin library to make sure your project can be easily opened somewhere else.
Title: Re: The Living PCB Design Thread
Post by: mkawa on Fri, 04 October 2013, 13:19:52
i think the most important thing is building up a component library and standardizing on one EDA package. i consider komar and bpiph's work in kicad to be sunk time, and yes, ascii files are a good backdoor to have, but keep in remind the reason why kicad exposes them to you (everyone uses text files to describe netlists and layout) is because it knows you're going to need to write a bunch of scripts and fix its bugs yourself.
Title: Re: The Living PCB Design Thread
Post by: MOZ on Fri, 04 October 2013, 13:29:45
I am surprised regack hasn't posted here thus far.

regack and I have been working on a couple of PCB designs, not just software end but hardware as well to develop and open-source keyboard controller, which could be directly plugged into any keyboard PCB with a specific connector, this would allow you to reuse your controller for newer projects and also as a replacement for the Teensy for DIY keyboards. The current footprint is about 60% of the Teensy so it can be mounted between keys as well.

Besides this we are working on a multi USB-head breakout board to convert any non-detachable keyboard to a detachable one.

Did I mention the "usb-hub" style board to allow multiple keyboard PCBs to be connected to one board and thus only utilise only one USB port and house all the PCBs into one board, thus allowing for a modular keyboard.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Fri, 04 October 2013, 14:41:48
KiCAD is powerful enough for what we need, easy enough to learn, and hackable enough to do fun stuff. And it is very cheap ;)
Title: Re: The Living PCB Design Thread
Post by: komar007 on Fri, 04 October 2013, 15:23:40
I think there's no need to decide for a single program for all of us, unless we want to actually buy some licenses.
Because I'm totally into KiCad, I can share the libraries I've already made (I just need to clean up the mess) - especially cherry switches, stabilizers, etc. and we can try to put together a geekhack component repository for KiCad.
Title: Re: The Living PCB Design Thread
Post by: JPG on Fri, 04 October 2013, 15:28:02
I think there's no need to decide for a single program for all of us, unless we want to actually buy some licenses.
Because I'm totally into KiCad, I can share the libraries I've already made (I just need to clean up the mess) - especially cherry switches, stabilizers, etc. and we can try to put together a geekhack component repository for KiCad.

This would help a lot of people trying to mess with things!
Title: Re: The Living PCB Design Thread
Post by: jdcarpe on Fri, 04 October 2013, 16:03:05
Because I'm totally into KiCad, I can share the libraries I've already made (I just need to clean up the mess) - especially cherry switches, stabilizers, etc. and we can try to put together a geekhack component repository for KiCad.

Yes, please this. I am trying to get started, but it seems overwhelming. If I had the component libraries, it would be much more accessible, I think.
Title: Re: The Living PCB Design Thread
Post by: mkawa on Fri, 04 October 2013, 17:13:36
I am surprised regack hasn't posted here thus far.

regack and I have been working on a couple of PCB designs, not just software end but hardware as well to develop and open-source keyboard controller, which could be directly plugged into any keyboard PCB with a specific connector, this would allow you to reuse your controller for newer projects and also as a replacement for the Teensy for DIY keyboards. The current footprint is about 60% of the Teensy so it can be mounted between keys as well.

Besides this we are working on a multi USB-head breakout board to convert any non-detachable keyboard to a detachable one.

Did I mention the "usb-hub" style board to allow multiple keyboard PCBs to be connected to one board and thus only utilise only one USB port and house all the PCBs into one board, thus allowing for a modular keyboard.
MOZ, you guys are working in kicad, correct?

if everyone posting in this thread works in kicad, then frankly i think it's decided ;)
Title: Re: The Living PCB Design Thread
Post by: MOZ on Fri, 04 October 2013, 20:16:14
I am surprised regack hasn't posted here thus far.

regack and I have been working on a couple of PCB designs, not just software end but hardware as well to develop and open-source keyboard controller, which could be directly plugged into any keyboard PCB with a specific connector, this would allow you to reuse your controller for newer projects and also as a replacement for the Teensy for DIY keyboards. The current footprint is about 60% of the Teensy so it can be mounted between keys as well.

Besides this we are working on a multi USB-head breakout board to convert any non-detachable keyboard to a detachable one.

Did I mention the "usb-hub" style board to allow multiple keyboard PCBs to be connected to one board and thus only utilise only one USB port and house all the PCBs into one board, thus allowing for a modular keyboard.
MOZ, you guys are working in kicad, correct?

if everyone posting in this thread works in kicad, then frankly i think it's decided ;)

Yup. KiCAD. Honestly, it is regack who is making the PCB, I just help with brainstorming and providing a different perspective on things and learn as much as possible from him. :D
Title: Re: The Living PCB Design Thread
Post by: komar007 on Sat, 05 October 2013, 11:46:13
Okay, so here's the initial KiCad component repository: https://github.com/geekhack-org/kicad-library
It's as basic as it can be, but I'll fill it with what I have and I hope there will be other contributors too.
Title: Re: The Living PCB Design Thread
Post by: MOZ on Sat, 05 October 2013, 19:35:15
Thanks a lot komar!
Title: Re: The Living PCB Design Thread
Post by: OldDataHands on Sat, 05 October 2013, 22:48:21
no love at all for gEDA's PCB ? it does the business!
Title: Re: The Living PCB Design Thread
Post by: agodinhost on Wed, 09 October 2013, 13:56:18
I did used Eagle a lot and it's a super tool. Sadly it does have some serious limitations in the free edition (only in the free edition).

KiCad usability sucks (I MEAN IT!) but it's the best open source tool out there (and no, the developers will not change it to make it more windows friendly).

Regarding libraries: Anything you do for eagle can be used in kicad. There is a tool to convert Eagle components to Kicad and it works very well. You can get all sparkfun components and use it in kicad without any problem.

Some usefull links (IMHO):
SparkFun-Eagle-Libraries (https://github.com/sparkfun/SparkFun-Eagle-Libraries)
Dangerous Prototypes, Eagle library converted to KiCad (http://dangerousprototypes.com/2012/09/18/eagle-parts-our-eagle-library-converted-to-kicad/) (dangerous-prototypes-open-hardware (http://dangerous-prototypes-open-hardware.googlecode.com/svn/trunk/Kicad_Part_Library/))
Adafruit Eagle Library (https://github.com/adafruit/Adafruit-Eagle-Library)
Title: Re: The Living PCB Design Thread
Post by: jalli on Sun, 24 November 2013, 10:11:52
As far as tutorials I found the EEVBlog review of Kicad to be the best "tutorial" around:
http://www.youtube.com/user/EEVblog/search?query=kicad

He also has a ton of good videos on PCB design, manufacturing, debugging, etc.

I would also vote for Kicad for my part, it's not the most intuitive and some of the nomenclature isn't correct but all in all I would say it does a pretty good job.
Title: Re: The Living PCB Design Thread
Post by: OldDataHands on Mon, 16 December 2013, 22:21:32
Can anyone describe a set of rules to create a proper set of pads for a solder bridge?



Hi Komar,

For your list at the top of this thread: PTH =  Plated Through Hole
Title: Re: The Living PCB Design Thread
Post by: jalli on Mon, 16 December 2013, 22:46:40
I'm guessing you mean what I would call a "solder jumper", I think the terminology is kinda loosely defined.

I tend to just use standard jumper footprints, I have attached a standard one that I use as a kicad .mod file.[attachurl=1]

Can anyone describe a set of rules to create a proper set of pads for a solder bridge?
Title: Re: The Living PCB Design Thread
Post by: komar007 on Tue, 17 December 2013, 04:01:37
For your list at the top of this thread: PTH =  Plated Through Hole
Thanks, added.
Title: Re: The Living PCB Design Thread
Post by: aref on Fri, 14 February 2014, 17:36:34
Nicely done. Thanks.
Title: Re: The Living PCB Design Thread
Post by: Melvang on Mon, 17 February 2014, 22:29:52
Nice work here.  Do we have any confirmed good tutorials for KiCad?  I would love to bring a couple ideas to frutition.  One would be an board I can use for the PC side of my Brushed Behemoth. 

The other would be very simple PCB for one switch.  The purpose would be to use them on each switch for hand wired matrix without the headache of trying to solder diodes and wires directly to switch pins.  If we make the PCB .500"x.500" or .525"x.525" they should be able to fit through the holes in the plate. 
Title: Re: The Living PCB Design Thread
Post by: MOZ on Tue, 18 February 2014, 01:35:12
regack made a nice tutorial, it is up on his github: https://github.com/regack/depot/raw/master/basics/Kicad_Basics.pdf

He is a sneaky bastard :P

My components and modules library is pretty much done as well, so I will post that later today as well.
Title: Re: The Living PCB Design Thread
Post by: Pacifist on Tue, 25 February 2014, 23:59:30
How long does it  take a newbie to design a 60% size PCB?
Title: Re: The Living PCB Design Thread
Post by: SpAmRaY on Wed, 26 February 2014, 06:55:29
How long does it  take a newbie to design a 60% size PCB?

I'm not sure there is an answer to that question, it could be 1 day if your a genius or it could be forever if you don't' have a clue.
Title: Re: The Living PCB Design Thread
Post by: BlueBär on Wed, 26 February 2014, 12:24:51
I'm trying to do something and found this small tutorial series: http://www.youtube.com/playlist?list=PLy2022BX6Esr6yxwDzhqYZyuuenJE2s5B
Can really recommend it.
Title: Re: The Living PCB Design Thread
Post by: Melvang on Wed, 26 February 2014, 21:19:50
regack made a nice tutorial, it is up on his github: https://github.com/regack/depot/raw/master/basics/Kicad_Basics.pdf

He is a sneaky bastard :P

My components and modules library is pretty much done as well, so I will post that later today as well.

Well I clicked on the link and all I got was a gray screen with a light gray oval in the middle.
Title: Re: The Living PCB Design Thread
Post by: whiskytango on Wed, 26 February 2014, 21:25:54
regack made a nice tutorial, it is up on his github: https://github.com/regack/depot/raw/master/basics/Kicad_Basics.pdf

He is a sneaky bastard :P

My components and modules library is pretty much done as well, so I will post that later today as well.

Well I clicked on the link and all I got was a gray screen with a light gray oval in the middle.

same here. I even tried right clicking and save as, but then the pdf I downloaded was corrupt.
Title: Re: The Living PCB Design Thread
Post by: Melvang on Wed, 26 February 2014, 21:28:57
regack made a nice tutorial, it is up on his github: https://github.com/regack/depot/raw/master/basics/Kicad_Basics.pdf

He is a sneaky bastard :P

My components and modules library is pretty much done as well, so I will post that later today as well.

Well I clicked on the link and all I got was a gray screen with a light gray oval in the middle.

same here. I even tried right clicking and save as, but then the pdf I downloaded was corrupt.

At least I'm not the only one.
Title: Re: The Living PCB Design Thread
Post by: MOZ on Wed, 26 February 2014, 22:05:27
Here: https://github.com/regack/depot

You'll have to download the zip
Title: Re: The Living PCB Design Thread
Post by: whiskytango on Wed, 26 February 2014, 22:30:00
Here: https://github.com/regack/depot

You'll have to download the zip

MOZ, you are the man. I didn't realize you could do that. I am a self-professed github noob though. Thanks.
Title: Re: The Living PCB Design Thread
Post by: Melvang on Wed, 26 February 2014, 22:38:32
Here: https://github.com/regack/depot

You'll have to download the zip

MOZ, you are the man. I didn't realize you could do that. I am a self-professed github noob though. Thanks.

Yeah, I am still trying to figure out how to download this zip file that I may not even be seeing.
Title: Re: The Living PCB Design Thread
Post by: MOZ on Wed, 26 February 2014, 22:39:55
Here: https://github.com/regack/depot

You'll have to download the zip

MOZ, you are the man. I didn't realize you could do that. I am a self-professed github noob though. Thanks.

Yeah, I am still trying to figure out how to download this zip file that I may not even be seeing.

Extreme right.
Title: Re: The Living PCB Design Thread
Post by: whiskytango on Wed, 26 February 2014, 22:42:04
Here: https://github.com/regack/depot

You'll have to download the zip

MOZ, you are the man. I didn't realize you could do that. I am a self-professed github noob though. Thanks.

Yeah, I am still trying to figure out how to download this zip file that I may not even be seeing.

it took me a minute to find it too. look at the red circled area on right:

(http://i967.photobucket.com/albums/ae156/jbedwell81/zipfile_zps0c8dd876.png)
Title: Re: The Living PCB Design Thread
Post by: Melvang on Wed, 26 February 2014, 22:46:16
Here: https://github.com/regack/depot

You'll have to download the zip

MOZ, you are the man. I didn't realize you could do that. I am a self-professed github noob though. Thanks.

Yeah, I am still trying to figure out how to download this zip file that I may not even be seeing.

it took me a minute to find it too. look at the red circled area on right:

Show Image
(http://i967.photobucket.com/albums/ae156/jbedwell81/zipfile_zps0c8dd876.png)


awesome thanks WT.
Title: Re: The Living PCB Design Thread
Post by: MOZ on Wed, 26 February 2014, 22:54:56
The package includes basic module and component libraries to get you started as well as some other random stuff.

Edit: Oh, and I forgot, I have ti upload the libraries, sorry for the delay, coming in a few hours
Title: Re: The Living PCB Design Thread
Post by: MOZ on Thu, 27 February 2014, 10:03:04
Here is the library.

This should suffice for almost every application for keyboard designing.

Contains components for eeschema as well as modules for PCBnew (Both parts of KiCAD)
Title: Re: The Living PCB Design Thread
Post by: Parak on Thu, 27 February 2014, 10:17:24
For production purposes, I believe the rule is to use a 0 ohm smd resistor part. Or somesuch.
Title: Re: The Living PCB Design Thread
Post by: Melvang on Thu, 27 February 2014, 22:41:37
So I was watching that youtube playlist from contextual electronics, and I am not sure if I am more confused or if I understand it better.  It seems like he does know what he is doing but didn't plan and rehearse the video series and keeps going 3 steps forward and 2 steps back to get ahead one step.  All I want to do is learn how to make a pcb for one switch with pads to solder wires to for making hand wired matrices easier to wire up.
Title: Re: The Living PCB Design Thread
Post by: BlueBär on Fri, 28 February 2014, 05:49:09
So I was watching that youtube playlist from contextual electronics, and I am not sure if I am more confused or if I understand it better.  It seems like he does know what he is doing but didn't plan and rehearse the video series and keeps going 3 steps forward and 2 steps back to get ahead one step.  All I want to do is learn how to make a pcb for one switch with pads to solder wires to for making hand wired matrices easier to wire up.

Hmm have you watched all videos yet? Maybe it get's more clear to you at the end.
Title: Re: The Living PCB Design Thread
Post by: Photekq on Mon, 03 March 2014, 10:28:05
So I just ordered 3x custom breakout boards from oshpark.. It cost me $2.05 WITH FREE 1ST CLASS SHIPPING TO THE UK.. seriously.. How can they make money at these prices?
Title: Re: The Living PCB Design Thread
Post by: MOZ on Mon, 03 March 2014, 13:03:24
So I just ordered 3x custom breakout boards from oshpark.. It cost me $2.05 WITH FREE 1ST CLASS SHIPPING TO THE UK.. seriously.. How can they make money at these prices?

Which boards?
Title: Re: The Living PCB Design Thread
Post by: Photekq on Mon, 03 March 2014, 13:12:08
So I just ordered 3x custom breakout boards from oshpark.. It cost me $2.05 WITH FREE 1ST CLASS SHIPPING TO THE UK.. seriously.. How can they make money at these prices?

Which boards?
Just some little 12x22mm mini usb breakout boards..

(http://i.imgur.com/Bs9hwmF.png)
Title: Re: The Living PCB Design Thread
Post by: Melvang on Tue, 04 March 2014, 23:42:58
I just wish I could figure out this damn KiCad.  I just want to make a small PCB with 3 holes and 6 pads.

Edit:  I am trying the tutorial found here (https://github.com/regack/depot) and I am going through it relatively painlessly until page 19.  This is the step where you associate the annotated items with footprints after generating the netlist.  The problem is on the right side of the popup pane I have 400+ options and none of the ones on the list in the tutorial are on there. 

Any ideas?
Title: Re: The Living PCB Design Thread
Post by: komar007 on Wed, 05 March 2014, 16:10:43
It looks like this tutorial uses some footprints not available in kicad. But don't worry, 90% of the time you'll have to design your own anyway.
Title: Re: The Living PCB Design Thread
Post by: komar007 on Wed, 05 March 2014, 16:23:17
regack made a nice tutorial, it is up on his github: https://github.com/regack/depot/raw/master/basics/Kicad_Basics.pdf

He is a sneaky bastard :P

My components and modules library is pretty much done as well, so I will post that later today as well.

I'm trying to do something and found this small tutorial series: http://www.youtube.com/playlist?list=PLy2022BX6Esr6yxwDzhqYZyuuenJE2s5B
Can really recommend it.

Thanks, these look like some really nice finds. I'll add them to the OP.
Title: Re: The Living PCB Design Thread
Post by: MOZ on Thu, 06 March 2014, 02:19:09
komar007, perhaps you could include the library posted here into the github.
Here is the library.

This should suffice for almost every application for keyboard designing.

Contains components for eeschema as well as modules for PCBnew (Both parts of KiCAD)

Title: Re: The Living PCB Design Thread
Post by: Melvang on Thu, 06 March 2014, 09:17:59
komar007, perhaps you could include the library posted here into the github.
Here is the library.

This should suffice for almost every application for keyboard designing.

Contains components for eeschema as well as modules for PCBnew (Both parts of KiCAD)

Also with those files, can I just drag and drop them into the correct KiCad folders?  Or do they need to be imported in the program?
Title: Re: The Living PCB Design Thread
Post by: komar007 on Thu, 06 March 2014, 10:37:17
komar007, perhaps you could include the library posted here into the github.
Here is the library.

This should suffice for almost every application for keyboard designing.

Contains components for eeschema as well as modules for PCBnew (Both parts of KiCAD)



It looks really good.
Since it forms a whole library, maybe you should create a git repo and I'll clone it into the geekhack organization.
Or, if you prefer to throw your stuff into our "kicad-library" repo, just clone it, commit what is necessary (don't forget some basic docs - see examples) and I'll pull your changes.
Title: Re: The Living PCB Design Thread
Post by: Melvang on Thu, 06 March 2014, 12:13:15
any suggestions for a SMD diode to be used for a keyboard switch?  I am looking for a part number and a data sheet for the footprint.
Title: Re: The Living PCB Design Thread
Post by: komar007 on Thu, 06 March 2014, 12:33:03
CD4148WS by Crownpo, the footprint is regular 0805.
DC Components produces it too.
Title: Re: The Living PCB Design Thread
Post by: regack on Thu, 06 March 2014, 12:49:59
CD4148WS by Crownpo, the footprint is regular 0805.
DC Components produces it too.


I had trouble locating those or something similar, so I switched over to an SOD-123 footprint and used these  Vishay 1N4148W-E3-08 SOD-123 diodes (http://www.vishay.com/docs/85748/1n4148w.pdf). 

I would love to have found those somewhere easy (for me) to buy from.
Title: Re: The Living PCB Design Thread
Post by: jdcarpe on Thu, 06 March 2014, 13:01:10
I don't know if this would be of interest to anyone else, but I recently discovered that you can order the ATmega32U4 in a TQFP-44 package size from PJRC (the company that makes Teensy) with the HalfKay bootloader pre-loaded onto them. Meaning you can use the convenient Teensy Loader software to load FW onto your keyboard.
Title: Re: The Living PCB Design Thread
Post by: Melvang on Thu, 06 March 2014, 13:24:47
Is there such a thing as a solder cup that I can solder to a PCB and then solder the wire in the cup?  basically individual solder cups
Title: Re: The Living PCB Design Thread
Post by: komar007 on Thu, 06 March 2014, 13:59:12
CD4148WS by Crownpo, the footprint is regular 0805.
DC Components produces it too.


I had trouble locating those or something similar, so I switched over to an SOD-123 footprint and used these  Vishay 1N4148W-E3-08 SOD-123 diodes (http://www.vishay.com/docs/85748/1n4148w.pdf). 

I would love to have found those somewhere easy (for me) to buy from.
Yes, the availability of these is poor to say the least. in general, 0805 diodes are hard to get anywhere in the world for reasons beyond my imagination, which footprint can possibly be better for signal diodes...

I don't know if this would be of interest to anyone else, but I recently discovered that you can order the ATmega32U4 in a TQFP-44 package size from PJRC (the company that makes Teensy) with the HalfKay bootloader pre-loaded onto them. Meaning you can use the convenient Teensy Loader software to load FW onto your keyboard.
HalfKay is the only thing I dislike about Teensy. I don't get the point of it. It doesn't have an ABI which would allow you to write to flash in runtime, so stuff like reprogramming layout on the GH60 doesn't work in a different way than by generating new firmware and flashing:/
It's small, smaller than Atmel's stock bootloader, but other than that it's a shame they put it on the Teensy at all.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Fri, 07 March 2014, 01:17:08
The nice thing about HalfKay is the easy use of the Teensy loader. I believe LUFA once included a Teensy loader compatible bootloader (although double the size of HalfKay), but the guy writing it (Dean Camera?) was asked to remove it from the library.
Title: Re: The Living PCB Design Thread
Post by: Photekq on Thu, 27 March 2014, 14:44:52
So my PCBs from oshpark arrived after a few weeks. I can't complain for $2. Unfortunately, I'm an idiot who doesn't know how to doublecheck his work :)) (note the trace doesn't quiiiite reach the pad)

(http://i.imgur.com/WHruMVK.jpg)
Title: Re: The Living PCB Design Thread
Post by: BlueBär on Thu, 27 March 2014, 14:50:00
So my PCBs from oshpark arrived after a few weeks. I can't complain for $2. Unfortunately, I'm an idiot who doesn't know how to doublecheck his work :)) (note the trace doesn't quiiiite reach the pad)

Show Image
(http://i.imgur.com/WHruMVK.jpg)


So close, yet so far...
Title: Re: The Living PCB Design Thread
Post by: SpAmRaY on Thu, 27 March 2014, 14:53:19
So my PCBs from oshpark arrived after a few weeks. I can't complain for $2. Unfortunately, I'm an idiot who doesn't know how to doublecheck his work :)) (note the trace doesn't quiiiite reach the pad)



so close....yet...so far away :D

EDIT:see what I get for answering my phone instead of posting right away, great minds think alike I guess  ;)
Title: Re: The Living PCB Design Thread
Post by: MOZ on Thu, 27 March 2014, 15:09:14
Lol that's funny.
Title: Re: The Living PCB Design Thread
Post by: hasu on Thu, 27 March 2014, 21:18:37
Photekq, DRC is your friend. It is not wise enough to save all mistakes, though.
Even with using DRC I still had  a silly mistake on my PCB a few days ago :D I failed to convert a legacy KiCad module into new pretty format.


BTW, a hilarious story of OSHPark guy.
https://twitter.com/chrismck_twit/status/446680807680126976
Title: Re: The Living PCB Design Thread
Post by: sipth on Fri, 09 May 2014, 22:47:41
Hi guys! I'm not sure if this is possible but if I want to make a PCB to fit 5x4 cherry mx switches to make a ultra 'mini' keyboard. isit possbie? As I was told that I can order PCBs from OSHpark and PCB wing. Lets say If im going to order from PCBwing what options am I suppose to select? I really know nothing about PCB so I'm hoping you guys can help me out, thanks! :)
Title: Re: The Living PCB Design Thread
Post by: komar007 on Sat, 10 May 2014, 09:22:25
Hi guys! I'm not sure if this is possible but if I want to make a PCB to fit 5x4 cherry mx switches to make a ultra 'mini' keyboard. isit possbie? As I was told that I can order PCBs from OSHpark and PCB wing. Lets say If im going to order from PCBwing what options am I suppose to select? I really know nothing about PCB so I'm hoping you guys can help me out, thanks! :)

If the board fits 5x4 cherry mx, then it has to be at least 3.75"x3", that is 11.25 sq. inches, so it'll cost you $56.25 in OSHpark and $59.26 in PCBWing. It seems this isn't the cheapest option. But anyway, for example in PCBWing, you just have to select all default options, nothing fancy should be necessary.
As for the design of the board, check out the GHPad project, it might be what you want.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sat, 10 May 2014, 09:35:45
PCBwing have their Simple quote order up to 4 dual side FR4 PCBs maximum 3.93" x 3.93", no slot holes, green solder maske, white silkscreen, and slightly wider tolerances than their more expensive options. $49 plus paypal fees, free shipping.

http://www.pcbwing.com/SimpleOrder.php
Title: Re: The Living PCB Design Thread
Post by: Melvang on Sat, 10 May 2014, 10:41:15
If you are planning on going with plate mount and will have room for a teensy, you can go with my enabler design.  PCBs for 20 switches would only cost $4.74 + shipping and pay pal fees and such.  Plus they are Alps compatible if you choose to go that route as well.
Title: Re: The Living PCB Design Thread
Post by: sipth on Sat, 10 May 2014, 12:32:54
Thanks for the reply! I just watched WhiteFireDragon's video to know more about building it, after thinking for awhile, i think that a 5x5 would be better. If im getting a 5x5 off PCBwing, all I need is to just change to dimension to 3.75 on each side? e.g http://imgur.com/sY2eWej

 I have a few questions tho,

 I think I can only go with PCB mounted keys as going for plate mount will just add up to the cost :P.

1. But if i ever want to go plate mount,  where can i get one?

2. Are there any cheaper board options for a 5x5?

3. would I need something like the teensy?

4. Is there anyone I can ask for the design of the board?

Sorry for the questions, still pretty new to the whole DIY keyboard thing.





Title: Re: The Living PCB Design Thread
Post by: komar007 on Sat, 10 May 2014, 15:35:43
Thanks for the reply! I just watched WhiteFireDragon's video to know more about building it, after thinking for awhile, i think that a 5x5 would be better. If im getting a 5x5 off PCBwing, all I need is to just change to dimension to 3.75 on each side? e.g http://imgur.com/sY2eWej (http://imgur.com/sY2eWej)

 I have a few questions tho,

 I think I can only go with PCB mounted keys as going for plate mount will just add up to the cost :p .

1. But if i ever want to go plate mount,  where can i get one?

2. Are there any cheaper board options for a 5x5?

3. would I need something like the teensy?

4. Is there anyone I can ask for the design of the board?

Sorry for the questions, still pretty new to the whole DIY keyboard thing.



If you're specifying the dimensions, you should rather take exact measurements from the design, the actual board size may differ.

1. you can ask various people here who design and make plates. I'm not into that sort of thing, but once you have a design, it should be easy to have a one-off cut in stainless steel with a laser
2. you can check various PCB prototyping companies. I think there are a lot more lower quality companies in China, which are cheaper and not that bad at all, I just haven't tried any.
3. if you're comfortable with SMD-soldering, then no, you can design or have someone design a board with an integrated controller, otherwise just go for a teensy-based solution, where you'll only need to solder the teensy to the board using goldpins
4. maybe check classifieds and this thread: http://geekhack.org/index.php?topic=45886.0 (http://geekhack.org/index.php?topic=45886.0) I won't offer my services, because I don't currently work for non-business-entities (legal issues).
Title: Re: The Living PCB Design Thread
Post by: qwack on Sat, 21 June 2014, 07:25:42
I am surprised to see that there is no link pointing to Komar's excellent article on How to make a keyboard - the matrix (http://blog.komar.be/how-to-make-a-keyboard-the-matrix/) at the beginning of the thread. There are lots of great info in this thread, especially about laying out stuff in kicad, but to me there is no point in knowing how to put the dough in the pan if you don't know how to make it from the base ingredients. I did not find many articles covering the fundamental principles behind keyboard designs, so that makes this one even more welcome.

If anyone knows of similar, thorough articles about matrix design, controller (Teensy ?) programming and perhaps LED matrix/controller stuff, it would be great to share them here. Unfortunately, it's easy to find close-ups of custom PCBs with enough bokeh to prevent anyone from learning anything from the showcased design (in other hobbies, reverse engineering is a common and not frowned upon method of learning), but it's harder to find genuinely instructive content like Komar's article about keyboards. But I'll keep searching ;D

[just to be clear, this is not a slight towards anyone (small scale sellers or fellow DIYers), it's just that I'm surprised to see so many custom keyboards projects, and yet the information seems a bit scarce (at least compared to what I see in other hobbies), despite the numerous build reports.]
Title: Re: The Living PCB Design Thread
Post by: komar007 on Sat, 21 June 2014, 11:49:28
Thanks, qwack. Added:)
Title: Re: The Living PCB Design Thread
Post by: gotofbi on Sun, 22 June 2014, 13:33:14
Thank you very much
veryy helpful information.
Title: Re: The Living PCB Design Thread
Post by: Koperati on Tue, 24 June 2014, 06:04:42
a useful list of books on pcb design can be found here: http://www.cadsoftusa.com/training/books
hope it migth be useful for some of you.


Title: Re: The Living PCB Design Thread
Post by: komar007 on Tue, 24 June 2014, 10:47:53
a useful list of books on pcb design can be found here: http://www.cadsoftusa.com/training/books
hope it migth be useful for some of you.
Thanks, added.
Title: Re: The Living PCB Design Thread
Post by: qwack on Fri, 27 June 2014, 07:35:17
To complement regack's, there is another great keyboard-oriented kicad tutorial (by bpiphany) on the deskthority wiki: http://deskthority.net/wiki/KiCAD_keyboard_PCB_design_guide

This one shows how to build an entire matrix and wire it to the controller along with status LEDs, which is very nice.
Title: Re: The Living PCB Design Thread
Post by: qwack on Wed, 09 July 2014, 07:46:03
I'm playing with Eagle, and unsurprisingly when I try to run the DRC (Seeed's rules) after placing some switches very close to allow for several layout options, I get errors:

(https://dl.dropboxusercontent.com/u/1042331/Keyboard/Misc/eag.PNG)

However, OSH Park does not refuse my board and renders it like this:

(https://dl.dropboxusercontent.com/u/1042331/Keyboard/Misc/osh.png)

So what do you think I should expect? I'll probably have a small test board made by OSH Park, and have a few PCBs made by Seeed in a more distant future. Will the plated holes just be partially drilled as shown on the render, or should I expect a disaster in this area (or more simply, could my board be simply refused because these parts overlap?)
Title: Re: The Living PCB Design Thread
Post by: MOZ on Wed, 09 July 2014, 14:29:37
Really depends on the fab,  we have seen partly drilled and plated overlapping holes in the past.
Title: Re: The Living PCB Design Thread
Post by: komar007 on Thu, 10 July 2014, 04:25:17
Last time I was using OSH Park, I needed 2 plated slots which OSH Park does not support, so I substituted them with 3 drills next to each other, overlapping. Strangely, I received a perfect plated slot, so I don't know what was going on. It actually looked like someone had noticed those drills and changed them back to slots which they don't support. Mind blown...
So it's hard to tell what to expect from OSH Park. You might get a slot instead of those overlapping holes, or you might get overlapping holes. I wouldn't expect a broken PCB though.
As for Seeed studio, I haven't used them yet. In general, PCB manufacturers are usually reluctant to make overlapping drills. So far I'm only certain that PCBCart can do them well.
Title: Re: The Living PCB Design Thread
Post by: qwack on Thu, 10 July 2014, 08:00:27
Thanks for the feedback guys. Is pcbcart the fab for the final GH60?

I'll probably have a small test board fabbed by seeed to see what they can do with this kind of arrangement before committing to larger projects.
Title: Re: The Living PCB Design Thread
Post by: MOZ on Thu, 10 July 2014, 08:18:27
Pcbwing does do overlapping PTH, as the Ergodox has them.

Regarding, OSHPark and the slots, it is mentioned in the forums as well,  to get plated holes, place multiple overlapping holes and you can add a slot to generate correct visuals.
Title: Re: The Living PCB Design Thread
Post by: Vitaly on Fri, 18 July 2014, 08:31:29
I searching for controller for first keyboard project. Can I use this http://goo.gl/PkPE6g? It's has same chip as teensy – ATmega32U4.
Title: Re: The Living PCB Design Thread
Post by: MOZ on Sun, 20 July 2014, 07:15:06
Yeah, those work fine.
Title: Re: The Living PCB Design Thread
Post by: Vitaly on Wed, 23 July 2014, 06:29:39
Yeah, those work fine.
Thanks. Get one and also arduino micro clone from ebay http://goo.gl/eSSVDx
Title: Re: The Living PCB Design Thread
Post by: glyph on Mon, 13 October 2014, 17:31:20
Hi I followed Reghak's tutorial to the end and am now having a play with KiCad  :thumb:. One problem I am experiencing is making reliable connections to the diodes in Pcbnew. Reghak suggests using SOD-123 (A-C) diodes but nine times out of ten I get this error:

Code: [Select]
Reading Netlist "\Shared\Keyboard\PCB\TEST Matrix\Test_matrix\Test_matrix.net"
Using component/footprint link file "\Shared\Keyboard\PCB\TEST Matrix\Test_matrix\Test_matrix.cmp"
Module [D1]: Pad [1] not found
Module [D1]: Pad [2] not found

After some googling I found this answer (http://t17347.cad-kicad-user.cadtalk.us/module-not-found-t17347.html) which I think might be related:

Quote
One gotcha that you might run into, is that the eeschema symbol and the
footprint mod must agree on pin names/numbers when I first started using
kicad, I found transistor footprints with pin names of e c b which would
not connect to their symbol counterparts (which had been numbered as 1
2 3) This confused me for a while until the penny dropped.

So I tried using a SOD-123 diode which has its pins numbered 1 and 2 rather than A and B, and it seems to work fine every time. Am I doing something wrong to get this error with the SOD-123 (A-C) diodes, should I be labelling the pads they connect to differently? What is the difference between these parts other than labelling?

Here is the SOD-123 (A-C) diode with missing connections:   
(http://i.imgur.com/1BkRtPh.png) (http://imgur.com/1BkRtPh)   

Here is the SOD-123
(http://i.imgur.com/ZJ8glhw.png)
Title: Re: The Living PCB Design Thread
Post by: hasu on Mon, 13 October 2014, 19:50:34
As the quote says you just have to use same pin names(numbers) in both schematic symbol and footprint module. If you want to use 'SOD-123 (A-C)' modules in pcbnew you must use diode symbol which has pin names A and C in eeschema.
Title: Re: The Living PCB Design Thread
Post by: glyph on Tue, 14 October 2014, 01:05:57
Quote from: hasu
As the quote says you just have to use same pin names(numbers) in both schematic symbol and footprint module. If you want to use 'SOD-123 (A-C)' modules in pcbnew you must use diode symbol which has pin names A and C in eeschema.

Hi hasu please excuse my newbishness. I am using what appears to be the same diode symbol in eeschema as I found in the tutorial.  I cant find any pin names, is there a hidden menu or value I am missing? I guess the same goes for the pads im using for the columns.

(http://i.imgur.com/Dhhitnx.png)

Title: Re: The Living PCB Design Thread
Post by: komar007 on Tue, 14 October 2014, 04:41:32
It seems that SOD123 (A-C) is a version of SOD123 with pins named A (for anode) and C (for cathode).
Eeschema sometimes uses letters for pin *numbers* to make library components generic (the pin number assignments vary between vendors). It's easier to just use an NPN symbol for an NPN transistor rather than a particular part like BC337 (this information you can put as value).
So sometimes for transistors you'll find pin numbers like B, C and E.
Some footprints in pcbnew reflect this, some don't.

The "standard" diode symbol in eeschema has actual numbers as pin numbers, so the right module to choose is SOD123.
If a module doesn't match the library pins, you can always change the module or library.
Just open the editor, "select active library", "load module from library", edit pins, rename and "create new library and save current module".
Then add the library to your project.
Title: Re: The Living PCB Design Thread
Post by: glyph on Tue, 14 October 2014, 05:41:23
Hi komar007 thanks for this information, I can see where I have gone wrong. I had taken the diode from the KB_common.lib which is part of Regack's tutorial on GitHub (https://github.com/regack/depot/tree/master/basics/0-Base). It appears the pins on the MX1A and CONN_1 are numbered, while the Diode uses letters. Maybe someone else can confirm this, so I can be sure I'm not going nuts. Having a play with the library editor really made sense and revealed the Pin numbers/letters. Great I learnt something new here.

I was wondering if I can use this thread for future trouble shooting, or is it more about sharing knowledge?

In the spirit of this thread I wanted to leave a really great link  (http://breadboardkiller.com/index.php/blog/82-exporting-gerbers-from-kicad)explaining how to export gerber files from KiCad.
Title: Re: The Living PCB Design Thread
Post by: komar007 on Tue, 14 October 2014, 09:35:04
Hi komar007 thanks for this information, I can see where I have gone wrong. I had taken the diode from the KB_common.lib which is part of Regack's tutorial on GitHub (https://github.com/regack/depot/tree/master/basics/0-Base). It appears the pins on the MX1A and CONN_1 are numbered, while the Diode uses letters. Maybe someone else can confirm this, so I can be sure I'm not going nuts. Having a play with the library editor really made sense and revealed the Pin numbers/letters. Great I learnt something new here.

I was wondering if I can use this thread for future trouble shooting, or is it more about sharing knowledge?

In the spirit of this thread I wanted to leave a really great link  (http://breadboardkiller.com/index.php/blog/82-exporting-gerbers-from-kicad)explaining how to export gerber files from KiCad.
Go ahead and use the thread for whatever you want, it's basically dead, so it needs some traffic;)
If more people asked questions and there were sensible answers, we could make an index of questions in the OP with links to parts of discussion.
BTW, I checked out your link and added it to the list of tutorials, thanks.
Title: Re: The Living PCB Design Thread
Post by: mkawa on Fri, 28 November 2014, 08:07:39
adafruit is now selling 3 packs of eagle licenses for extremely reasonable prices. anyone interested in splitting a package? kicad is so horrid XD
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Fri, 28 November 2014, 08:17:15
<3 KiCAD

And it is steadily improving.
Title: Re: The Living PCB Design Thread
Post by: mrflow3r on Thu, 01 January 2015, 15:49:28
adafruit is now selling 3 packs of eagle licenses for extremely reasonable prices. anyone interested in splitting a package? kicad is so horrid XD

I'd be down. Which package were you looking at? The 3 seat standard ($1230 USD)?
Title: Re: The Living PCB Design Thread
Post by: Parak on Thu, 01 January 2015, 16:42:09
Kicad, especially given the recent changes in the past year, has been extremely good to me. Eagle on the other hand was unbearable. Unless one is designing complex fpga 10+ layer boards with RF considerations or somesuch, in which case maybe Altium is more suitable.

Diptrace was also quite nice, but I kept going back to Kicad.. if only Kicad could properly do 3d import and export in step or similar...
Title: Re: The Living PCB Design Thread
Post by: SeeThruHead on Sun, 11 January 2015, 23:05:20
realised it was a dumb question
Title: Re: The Living PCB Design Thread
Post by: Wilba on Sun, 15 February 2015, 21:12:04
I've seen a couple of keyboard PCBs that cover the through-hole pads on the top side with solder mask. e.g.

[attach=1]

Does anyone know why this is done? I'm guessing it might make it a tiny bit easier to desolder a switch or LED, since there won't be a pad under the switch for solder to form.
I'm thinking of doing that on the Planck/Atomic PCB but I also prefer to know why something is done a certain way, rather than just copy blindly...


Title: Re: The Living PCB Design Thread
Post by: qwack on Mon, 16 February 2015, 07:28:56
I know that it is called tenting when done on vias, but I have no idea how functionally useful it might be for regular pads. Maybe just an aesthetic choice? Or a way to indicate to the user "hey, you have to solder on the other side!"  ;D

In any case, if your pads/drills are sized properly in the first place, desoldering should not be a problem.
Title: Re: The Living PCB Design Thread
Post by: jdcarpe on Mon, 16 February 2015, 09:31:31
I've seen a couple of keyboard PCBs that cover the through-hole pads on the top side with solder mask. e.g.

(Attachment Link)

Does anyone know why this is done? I'm guessing it might make it a tiny bit easier to desolder a switch or LED, since there won't be a pad under the switch for solder to form.
I'm thinking of doing that on the Planck/Atomic PCB but I also prefer to know why something is done a certain way, rather than just copy blindly...




I probably would not do that, if it were me. Leaving the through hole pads on both sides allows the solder to flow through and create a fillet on both sides, making a better connection.
Title: Re: The Living PCB Design Thread
Post by: vvp on Tue, 17 February 2015, 02:56:13
Kicad, especially given the recent changes in the past year, has been extremely good to me. Eagle on the other hand was unbearable. Unless one is designing complex fpga 10+ layer boards with RF considerations or somesuch, in which case maybe Altium is more suitable.

Diptrace was also quite nice, but I kept going back to Kicad.. if only Kicad could properly do 3d import and export in step or similar...
I used a git version of kicad for Katy and (especially considering its price) it is good enough for a simple keyboard ... and it would be great if it could import step files.
Title: Re: The Living PCB Design Thread
Post by: sethk_ on Thu, 19 February 2015, 16:03:48
I am currently stuck with what to do with KiCad and I am following the tutorial exactly, but I am at the point where I am in cvpcb, and I added the KIPRJMOD footprint folder, and the components won't show up and I am stuck. Any help will be great! TIA!

(http://i.gyazo.com/4fe7d72bf9949b52320a7eb31506e22c.png)
Title: Re: The Living PCB Design Thread
Post by: vvp on Thu, 19 February 2015, 16:52:35
You need a local library of footprints only when you are drawing your own footprints.
You need to draw (or import) your own footprints only when you cannot find some suitable footprints in the standard libraries.
You should be able to find standard footprints at least for the diodes.
Select appropriate library on the left (e.g. Diodes_SMD or Diodes_ThroughHole), leave D1 selected in the middle plane, and select filtering to library and pin count (the last 3 icons in the toolbar). You should see some options in the right pane.
Title: Re: The Living PCB Design Thread
Post by: sethk_ on Thu, 19 February 2015, 17:04:54
You need a local library of footprints only when you are drawing your own footprints.
You need to draw (or import) your own footprints only when you cannot find some suitable footprints in the standard libraries.
You should be able to find standard footprints at least for the diodes.
Select appropriate library on the left (e.g. Diodes_SMD or Diodes_ThroughHole), leave D1 selected in the middle plane, and select filtering to library and pin count (the last 3 icons in the toolbar). You should see some options in the right pane.
I don't see anything after pressing all of those :-(
Title: Re: The Living PCB Design Thread
Post by: vvp on Thu, 19 February 2015, 18:52:29
Try to deactivate all 3 filters (keyword, library, and pin count).
Still not seeing anything?
Title: Re: The Living PCB Design Thread
Post by: sethk_ on Thu, 19 February 2015, 18:54:52
Try to deactivate all 3 filters (keyword, library, and pin count).
Still not seeing anything?
Nope
Title: Re: The Living PCB Design Thread
Post by: vvp on Thu, 19 February 2015, 19:04:45
That sucks.
Well, I use it on linux and two more things needed to be done to have kicad footprints working were:Maybe something similar needs to be done on windows too. Of course, it should have been done by setup. If somebody who uses kicad on windows does not chime in with some ideas then you may try to ask on #kicad IRC channel, or some kicad mailing list. This works fine for me on linux.
Title: Re: The Living PCB Design Thread
Post by: sethk_ on Thu, 19 February 2015, 19:32:55
That sucks.
Well, I use it on linux and two more things needed to be done to have kicad footprints working were:
  • setting environment variable KISYSMOD to the directory with footprints (in my case /usr/share/kicad/footprints)
  • copying /usr/share/kicad/footprints/fp-lib-table to ~/.config/kicad
Maybe something similar needs to be done on windows too. Of course, it should have been done by setup. If somebody who uses kicad on windows does not chime in with some ideas then you may try to ask on #kicad IRC channel, or some kicad mailing list. This works fine for me on linux.
Thanks!
Title: Re: The Living PCB Design Thread
Post by: sethk_ on Thu, 19 February 2015, 21:24:06
Apparently the reasons why it won't work is because I need to update the .mod files to the new format?
Title: Re: The Living PCB Design Thread
Post by: vvp on Fri, 20 February 2015, 07:21:11
Well, the format of footprint files changed when I changed from about a year old release to a git version.
But the install should copy the new footprint libraries to your PC. And the uninstall of the old version should have removed the old libraries.
On linux, I did not need to upgrade any libraries. I needed to set path to new libraries, update fp-lib-table, and (for the PCB which I needed to modify) I needed to assign footprints from the new libraries. I do not have any experience with windows version of kicad so I do not know how the upgrade would go there.
There is also some way how to pull footprints directly from git (internet) instead of from your local install of kicad. But I do not use it so I'm not sure how that must be setup.
Title: Re: The Living PCB Design Thread
Post by: twiddle on Fri, 20 February 2015, 07:42:04
Just curious to see what people think of this, my first attempt at designing a simple prototype dev board for some custom controller work I am doing (this particular design is evaluating a LPC11U35). Once I verify I've got all the hardware I need for a functional chip I intend to look at > 2 layers so I can break out as many of the IOs as possible, etc, but this prototype is going to be etched at home (I manually broke a few IO pins out to a header on the actual board layout you can see here).
(http://i.imgur.com/xX5RQ5V.png) (http://imgur.com/xX5RQ5V)

(http://i.imgur.com/YcxDm3y.png) (http://imgur.com/YcxDm3y)
Title: Re: The Living PCB Design Thread
Post by: sethk_ on Fri, 20 February 2015, 09:42:04
Well, the format of footprint files changed when I changed from about a year old release to a git version.
But the install should copy the new footprint libraries to your PC. And the uninstall of the old version should have removed the old libraries.
On linux, I did not need to upgrade any libraries. I needed to set path to new libraries, update fp-lib-table, and (for the PCB which I needed to modify) I needed to assign footprints from the new libraries. I do not have any experience with windows version of kicad so I do not know how the upgrade would go there.
There is also some way how to pull footprints directly from git (internet) instead of from your local install of kicad. But I do not use it so I'm not sure how that must be setup.
I just got around this by  installing an older version of KiCAD, the lazy way.
Title: Re: The Living PCB Design Thread
Post by: vvp on Fri, 20 February 2015, 12:16:15
Just curious to see what people think of this...
I did not study your schematic but your PCBs looks very empty.
I etch at home and my experience is that it is easy to do if you have min track width 0.3 mm, min gap 0.25 mm, min via diameter 1 mm, min via drill 0.5 mm. One sided PCBs with these limits are easy to do even using the most simple toner transfer method (and you can put there as many tracks as they fit). If I would need to etch both sides I would probably prefer photo resist since it is easier to align. I typically design them as two sided and I put as much tracks as possible on the back side. I put only straight tracks on the front side so that I can decide not to etch front side but just put Φ0.25 mm wire bridges instead. If there is not too many of front side tracks then I etch only the back side.
You can look how it looks like here: https://geekhack.org/index.php?topic=48851.msg1644678#msg1644678

Edit: And add fill zones if you etch at home. You will save your FeCl3 or whatever you use. You can just create one zone over the whole PCB and assign it to NoNet. So it is easy to add.
Title: Re: The Living PCB Design Thread
Post by: sethk_ on Fri, 20 February 2015, 12:18:18
Does anyone have suggestions on spacing the pads and what not?
Title: Re: The Living PCB Design Thread
Post by: twiddle on Fri, 20 February 2015, 14:57:33
min track width 0.3 mm, min gap 0.25 mm

Edit: And add fill zones if you etch at home. You will save your FeCl3 or whatever you use. You can just create one zone over the whole PCB and assign it to NoNet. So it is easy to add.
These were the settings that I used, however trying to do it on a single sided board is next to impossible in situations like this, at least to my understanding:
(http://i.imgur.com/F88DQIU.png?1) (http://imgur.com/F88DQIU)
Unless I use a through-hole cap, it's hard to see how I can route the crystal unless I do something like this:

(http://i.imgur.com/8Kn0jEI.png?1) (http://imgur.com/8Kn0jEI)

And that means the decoupling cap is too far from the microcontroller, I think.

good tip about the fill zones, that is easy enough to do.
Title: Re: The Living PCB Design Thread
Post by: vvp on Fri, 20 February 2015, 18:49:09
Yes, you probably need a via for the crystal. I do not know whether it is acceptable to put the decoupling capacitor so far away to allow routing around the crystal.

Do you need the crystal? Are internal clock sources that bad? In my case, it is optional. Using an internal clock source is recommended for USB anyway (not sure if it is even possible to use an external clock source for it). And I do not need that precise time for anything else.
Title: Re: The Living PCB Design Thread
Post by: twiddle on Fri, 20 February 2015, 19:26:43
Yes, you probably need a via for the crystal. I do not know whether it is acceptable to put the decoupling capacitor so far away to allow routing around the crystal.

Do you need the crystal? Are internal clock sources that bad? In my case, it is optional. Using an internal clock source is recommended for USB anyway (not sure if it is even possible to use an external clock source for it). And I do not need that precise time for anything else.

Almost every chip I am evaluating *requires* the crystal for USB, from Freescale's K22 range through the LPC and STM32s. I guess I could try without and just see, heh. All of their datasheets claim the internal oscillator isn't accurate enough, though.
Went back to it and took another shot at doing everything manually, but with liberal use of vias and the second layer:
(http://i.imgur.com/QTMpDmI.png) (http://imgur.com/QTMpDmI)
Title: Re: The Living PCB Design Thread
Post by: vvp on Sat, 21 February 2015, 05:58:29
Interesting. I thought only some old chips (like ATmega) need external crystal for USB. You are using ARM which I thought to be much higher level.

ATxmega does not need external crystal for USB but it may use it if one prefers so (though I do not know why anybody would do it if the internal one is good enough). I would quite like ATxmega also for other things besides keyboards if its ADC would be better.
Title: Re: The Living PCB Design Thread
Post by: nandop on Mon, 23 February 2015, 14:39:34
Are there any footprints for the AT90USB1287? I can't seem to find one.
Title: Re: The Living PCB Design Thread
Post by: sypl on Mon, 23 February 2015, 19:25:00
Hi all. Does anyone know how to import the geekhack footprints [https://github.com/geekhack-org/kicad-library/tree/master/modules]? In Cvpcb I do the following:
- Go to 'Edit library table'
- Click on 'project specific libraries'  tab, then click 'append library'
- fill in details with nickname 'geekhack', path as local path (/Users/sypl/keyboards/kicad/libraries/kicad-library/modules), plugin type 'KiCad'
- Click ok,

But when I click on the geekhack library it shows nothing. Only library filter is on.
Title: Re: The Living PCB Design Thread
Post by: sethk_ on Mon, 23 February 2015, 19:40:57
Hi all. Does anyone know how to import the geekhack footprints [https://github.com/geekhack-org/kicad-library/tree/master/modules]? In Cvpcb I do the following:
- Go to 'Edit library table'
- Click on 'project specific libraries'  tab, then click 'append library'
- fill in details with nickname 'geekhack', path as local path (/Users/sypl/keyboards/kicad/libraries/kicad-library/modules), plugin type 'KiCad'
- Click ok,

But when I click on the geekhack library it shows nothing. Only library filter is on.
Yeah, I had the same issue. What version are you using? If you are using the newest version, download the one from like 7-7-2013, and then add them in using the guide.
Title: Re: The Living PCB Design Thread
Post by: sypl on Mon, 23 February 2015, 19:55:48
I didn't manage to import that library, and I think it may be a format thing. There's a new format for modules in kicad it seems. I imported this using the github option and it worked a charm: https://github.com/stormbard/Keyboard.pretty
Title: Re: The Living PCB Design Thread
Post by: hasu on Mon, 23 February 2015, 22:16:31
Are there any footprints for the AT90USB1287? I can't seem to find one.

You can find it under library Housings_DFN_QFN or Housing_QFP. But before using you better check it thoroughly with refering datasheet.

https://github.com/KiCad/Housings_DFN_QFN.pretty
https://github.com/KiCad/Housings_QFP.pretty
Title: Re: The Living PCB Design Thread
Post by: hasu on Mon, 23 February 2015, 22:35:46
I can add those footprints with your method but I use path like '/home/noname/tmp/gh-test/tqfp.mod'.

Nickname: tqfp
Library Path: /home/noname/tmp/gh-test/tqfp.mod
Plugin Type: Legacy

Version info of my KiCad.
Code: [Select]
Application: kicad
Version: 0.201501310101+5397~21~ubuntu14.10.1-product Release build
wxWidgets: Version 3.0.1 (debug,wchar_t,compiler with C++ ABI 1002,GCC 4.9.1,wx containers,compatible with 2.8)
Platform: Linux 3.16.0-30-generic x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.54.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON
         KICAD_USE_WEBKIT=ON


Hi all. Does anyone know how to import the geekhack footprints [https://github.com/geekhack-org/kicad-library/tree/master/modules]? In Cvpcb I do the following:
- Go to 'Edit library table'
- Click on 'project specific libraries'  tab, then click 'append library'
- fill in details with nickname 'geekhack', path as local path (/Users/sypl/keyboards/kicad/libraries/kicad-library/modules), plugin type 'KiCad'
- Click ok,

But when I click on the geekhack library it shows nothing. Only library filter is on.
Title: Re: The Living PCB Design Thread
Post by: sypl on Tue, 24 February 2015, 05:49:55
Ah, legacy, of course. Thanks for that! I like the other library better though, so will stick with that.

I can add those footprints with your method but I use path like '/home/noname/tmp/gh-test/tqfp.mod'.

Nickname: tqfp
Library Path: /home/noname/tmp/gh-test/tqfp.mod
Plugin Type: Legacy

Version info of my KiCad.
Code: [Select]
Application: kicad
Version: 0.201501310101+5397~21~ubuntu14.10.1-product Release build
wxWidgets: Version 3.0.1 (debug,wchar_t,compiler with C++ ABI 1002,GCC 4.9.1,wx containers,compatible with 2.8)
Platform: Linux 3.16.0-30-generic x86_64, 64 bit, Little endian, wxGTK
Boost version: 1.54.0
         USE_WX_GRAPHICS_CONTEXT=OFF
         USE_WX_OVERLAY=OFF
         KICAD_SCRIPTING=ON
         KICAD_SCRIPTING_MODULES=ON
         KICAD_SCRIPTING_WXPYTHON=ON
         USE_FP_LIB_TABLE=HARD_CODED_ON
         BUILD_GITHUB_PLUGIN=ON
         KICAD_USE_WEBKIT=ON


Hi all. Does anyone know how to import the geekhack footprints [https://github.com/geekhack-org/kicad-library/tree/master/modules]? In Cvpcb I do the following:
- Go to 'Edit library table'
- Click on 'project specific libraries'  tab, then click 'append library'
- fill in details with nickname 'geekhack', path as local path (/Users/sypl/keyboards/kicad/libraries/kicad-library/modules), plugin type 'KiCad'
- Click ok,

But when I click on the geekhack library it shows nothing. Only library filter is on.
Title: Re: The Living PCB Design Thread
Post by: sypl on Tue, 24 February 2015, 06:59:39
Oops, maybe spoke too soon. The numbers on the pins on the teensy from that library don't match my schematic. Is there a teensy footprint for kicad out there that will match this schematic?

[attach=1]
[attach=2]
Title: Re: The Living PCB Design Thread
Post by: sypl on Tue, 24 February 2015, 07:58:06
I think I'll just copy the footprint to a new library and re-assign the pin numbers, like so:

[attach=1]

But I'm not sure what pin numbers to assign to the GND and VCC pins. Can I just pick any of the existing GND pin numbers (35, 43, 23, 15)?
Title: Re: The Living PCB Design Thread
Post by: loarto on Tue, 24 February 2015, 13:26:11
I can't manage to import the mx1a.mod to kicad. I'm using (2013-may-18)-stable and I get this message when I try to use it: IO_ERROR: File '/home/plitter/Downloads/mx1a.mod' is empty or is not a legacy library
from /build/kicad/src/stable_2013-05-18_BZR4017/pcbnew/legacy_plugin.cpp : ReadAndVerifyHeader() : line 3984

Any ideas?
Title: Re: The Living PCB Design Thread
Post by: sypl on Tue, 24 February 2015, 18:12:13
Did importing tqfp.mod work for you?
Title: Re: The Living PCB Design Thread
Post by: loarto on Wed, 25 February 2015, 08:00:44
Hmm, all my own fault. I tried to "Save link as" and didn't check after, so what I got in my mx1a file was just html code :p I copy pasted the file and afterwards I could import it :)

[EDIT:] Anyone have a footprint of a teensy 31? :)
Title: Re: The Living PCB Design Thread
Post by: sypl on Fri, 27 February 2015, 13:20:06
This is my first attempt at a pcb with kicad.

[attach=1]

I think it's okay, but when I export to gerber and view it in kicad's gerber viewer it looks kind of strange, with numbers along the lines, like so:

[attach=2]

Close-up:

[attach=3]

Is this a bug? Has anyone experienced this before? I tried uploading to OSH Park after renaming the files and it renders ok, so I think the file's are good, but it's just weird seeing them rendered like this.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Fri, 27 February 2015, 14:11:00
Those numbers are just the "aperture" used for that item in the gerber files. They will be quite useful if you want to muck around in the gerbers yourself. The gerber files are really simple. The file format description is short and a nice read if you are interested in hacking something fun onto your circuit boards. The %LPC*% and %LPD*% commands or G36/G37 for polygons, and so on.
Title: Re: The Living PCB Design Thread
Post by: MOZ on Fri, 27 February 2015, 14:11:36
You have to select which elements you want to view in KiCAD.
Title: Re: The Living PCB Design Thread
Post by: qwack on Thu, 19 March 2015, 15:52:40
Does anyone have recommendations regarding trace width and spacing (/isolation) ? More specifically, I'd like to know if 16 mil is a safe value for the traces connecting switches, and if it is okay with LEDs as well. I know there are calculators which outputs recommended values depending on the current carried by the traces, but I'm more interested in practical experience. What do you guys generally use for your keyboard PCBs?
Title: Re: The Living PCB Design Thread
Post by: sypl on Thu, 19 March 2015, 20:12:34
What would happen if I were to connect two or more mini (or micro) usb ports for data transfer to the same pins? I was thinking it would be nice to have a keyboard with ports top, left and right. Top would be useful if using desktop and long cable; left and right would be useful for short cables on top of laptops. If someone went crazy and plugged in all three would it fry the board or something? Would it read as three keyboards?
Title: Re: The Living PCB Design Thread
Post by: sypl on Thu, 09 April 2015, 13:49:56
Makes me a little sad to see I was the last poster in this thread almost a month ago... No PCB love?

Anyway, I had another question. I want to make a PCB with the atmega32u4, but waaaaaay stripped down from the teensy2.0. I only need 16pins and a usb connector, and that's it (I think).

Given this schematic [https://www.pjrc.com/teensy/schematic2.gif], how much of this can I junk? For the usb I have to connect d+, d-, uvcc, ugnd and vbus it looks like, as well as some capacitors. And I think it's safe to get rid of the reset button, right? I can reset via software, yes? Would that do it?
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Thu, 09 April 2015, 14:33:03
What would happen if I were to connect two or more mini (or micro) usb ports for data transfer to the same pins? I was thinking it would be nice to have a keyboard with ports top, left and right. Top would be useful if using desktop and long cable; left and right would be useful for short cables on top of laptops. If someone went crazy and plugged in all three would it fry the board or something? Would it read as three keyboards?

This will probably work. You aren't exactly expecting USB3 speed or anything.. Don't plug more than one in. I don't know for sure what will happen to the data lines, if they could short out or something.


Makes me a little sad to see I was the last poster in this thread almost a month ago... No PCB love?

Anyway, I had another question. I want to make a PCB with the atmega32u4, but waaaaaay stripped down from the teensy2.0. I only need 16pins and a usb connector, and that's it (I think).

Given this schematic [https://www.pjrc.com/teensy/schematic2.gif], how much of this can I junk? For the usb I have to connect d+, d-, uvcc, ugnd and vbus it looks like, as well as some capacitors. And I think it's safe to get rid of the reset button, right? I can reset via software, yes? Would that do it?


Until you eff up the software... At least route Reset out to a pad on the board. That makes it a bit easier to jumper it to ground than trying to hit the correct pin on the chip. You don't need an actual button.

You should really keep most of the components. Drop the LED and resistor, reset button, and perhaps use the same capacitor for bypassing VCC and AVCC. You also of course don't need the footprints for the voltage regulator and such.
Title: Re: The Living PCB Design Thread
Post by: sypl on Sat, 11 April 2015, 19:13:30
Hey, thanks for the reply bpiphany. Another question. In the schematic what are the rectangular pads, where it says 5V and 3V next to them? Are these pads for fuses? Do I need both of them?

This is what I have so far:
[attach=1]

Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sun, 12 April 2015, 02:58:00
The rectangular pads are for a voltage regulator. It makes it possible to run the ATmega at 3.3V instead of 5V which could possibly be handy if you have other peripherals made for 3.3V. You can forget all about that.

Your capacitors in the top left corner are not connected correctly. You ideally want at least a 10µF capacitor between VCC and GND anywhere in your design, an electrolyte will be good. Then you want 0.1µF or 1.0µF "bypass" capacitors at every VCC pin to ensure you don't ever so momentarily drop the supply voltage at that pin, and also to filter out some EMI (I think). The datasheet should hold more info on which value capacitors to use where. Here you want small ceramic capacitors to be able to place them close to their supply pin.
Title: Re: The Living PCB Design Thread
Post by: vvp on Sun, 12 April 2015, 09:14:07
ESD protection is missing which I think is OK.
Additional LC filter for AVcc is missing which is OK if you do not care that much about ADC.
External Crystal is missing which I think is bad if you want to use USB.
Title: Re: The Living PCB Design Thread
Post by: vvp on Sun, 12 April 2015, 09:26:17
Here is a schematic I found somewhere which has:Compared to your version there is also external ARef and PE2 is not dedicated as HWB.
Title: Re: The Living PCB Design Thread
Post by: sypl on Wed, 22 April 2015, 13:17:52
Your capacitors in the top left corner are not connected correctly. You ideally want at least a 10µF capacitor between VCC and GND anywhere in your design, an electrolyte will be good. Then you want 0.1µF or 1.0µF "bypass" capacitors at every VCC pin to ensure you don't ever so momentarily drop the supply voltage at that pin, and also to filter out some EMI (I think). The datasheet should hold more info on which value capacitors to use where. Here you want small ceramic capacitors to be able to place them close to their supply pin.

Thanks for the replies, bpiphany and vvp. You say I need a bypass capacitor at each VCC, but if I don't intend to use any of them other than the one connected to the usb, is this still necessary? Can I just leave them unconnected?
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 22 April 2015, 14:14:55
They are not for you to use - they are for you to supply with power.
Title: Re: The Living PCB Design Thread
Post by: sypl on Wed, 22 April 2015, 14:44:22
They are not for you to use - they are for you to supply with power.

Please be patient, I'm pretty new to the pcb game. Pins 14 and 34 are VCC pins on my teensy. I don't use them so am not supplying power to them, so my thinking was that I could skip connecting them. Similarly ground pins 15 and 35. Is this logic faulty?
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 22 April 2015, 15:28:50
Sorry, I was just trying to be funny =)

If you check the VCC and GND pins on the ATmega on the Teensy you will find that they are all connected to where they are supposed to. And there are bypass capacitors spread out around the chip as well.
Title: Re: The Living PCB Design Thread
Post by: vvp on Wed, 22 April 2015, 15:51:03
You should connect all the Vcc and GND pins the package has. And you should add all the bypass capacitors especially if the common power filtering capacitor (C2 on my picture) is not very near the controller package. The bypass capacitors should be SMD so that you can put them within 1-2 millimeters from the package pins. If you cannot use SMD bypass capacitors and the common power filtering capacitor is as near as possible to the package then you can leave out the bypass capacitors (but still connect the pins) since the through hole bypass capacitors will not help much for such a small package. The scheme I posted does not have the bypass capacitors drawn. If your supply voltage is significantly higher than the minimum for the given controller clock and the main filtering capacitor is near the package then there is a good chance it will work well without the SMD bypass capacitors. I would rather put them on the final revision though.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Fri, 24 April 2015, 05:04:34
I'm not sure I would be fudging around that much with the Reset pin. On the Teensy they didn't put any extra components on it. It has an internal pull-up which seem to be perfectly sufficient. I have another development board which has a lot of extra junk on the reset pin, and it has troubles starting from the application when powered up. I think this is due to the Reset pin being pulled low at startup before C2 (or corresponding on my board) has charged up. Perhaps the D1 diode solves that issue. But I really don't think you should need to fuss around with the Reset at all..
Title: Re: The Living PCB Design Thread
Post by: vvp on Fri, 24 April 2015, 08:23:54
I agree, I do not use the stuff around the reset myself on my ATXmega board. I have only a switch there which can short reset to GND and nothing else. But ATXmega has better ESD protection on the reset pin than ATmega.

I can roughly explain why the example scheme is there the way it was drawn. I did not do any simulations so it is only a rough idea and guesses.

ATmega32u4 can use parallel programming which is started with 12V applied to the reset pin. To allow this there is no (or lower) ESD protection on the reset pin. The diode D1 is there to provide the ESD protection: any voltage higher than 5V from a user when he presses a reset button (the reset button is not drawn in the scheme) should be shorted to Vcc. The C8 is there to provide more stability for reset pin. No idea how it could be problem for start-up as you indicated. If you keep reset low at start-up it should only postpone the start-up (since the voltage eventually rises and it should rise later on C8 than on C2 since C8 is powered from C2 through 10kΩ pull-up resistor R3 (and the internal reset pin pull-up which is probably about 20kΩ or more).

So my conclusion is:
Title: Re: The Living PCB Design Thread
Post by: sypl on Sat, 25 April 2015, 17:22:56
Thanks again, fellas. This is what I have now, which is looking more and more just like the teensy schematic. Any egregious errors?
[attach=1]

I added a crystal and connected vbus to vcc (forgot to do that previously). If I understand correctly the .1uF capacitors must be placed as closely to the chip as possible, correct?
Title: Re: The Living PCB Design Thread
Post by: vvp on Sun, 26 April 2015, 04:36:05
If I understand correctly the .1uF capacitors must be placed as closely to the chip as possible, correct?
Yes.

Do not connect RESET pin to GND in the PCB. The chip would never start (exit from reset). You can pull it out to a connector as you indicated in the schematic and then (if you want to externally reset the chip) you would connect the pin to ground temporally (probably with some push button).

The 1µF capacitor between VBUS and GND looks small to me (but it will probably work as you have it). I would put there something between 10 - 20 µF.

And maybe something else I did not notice :)

Next time assign unique references to the parts so that it is easier to talk about them.
Title: Re: The Living PCB Design Thread
Post by: hasu on Sun, 26 April 2015, 23:07:25
The 1�F capacitor between VBUS and GND looks small to me (but it will probably work as you have it). I would put there something between 10 - 20 �F.

Bypass capacitance of device is limited to 1-10uF if I read the spec correctly.

From 7.2.4.1 Inrush Current Limiting of USB2.0 specification,
Quote
The maximum droop in the hub V BUS is 330 mV, or about 10% of the nominal signal swing from the function.
In order to meet this requirement, the following conditions must be met:
• The maximum load (C RPB ) that can be placed at the downstream end of a cable is 10 μ F in parallel with
44 Ω . The 10 μ F capacitance represents any bypass capacitor directly connected across the V BUS lines in
the function plus any capacitive effects visible through the regulator in the device. The 44 Ω resistance
represents one unit load of current drawn by the device during connect.
• If more bypass capacitance is required in the device, then the device must incorporate some form of V BUS
surge current limiting, such that it matches the characteristics of the above load.

And see Upstream Facing Port Bypass Capacitance(CRPB) of Table 7-7. DC Electrical Characteristics.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sun, 26 April 2015, 23:58:59
Regarding the capacitor on Reset, my idea is that when plugging the USB in GND is first pulled low, this pulls reset to GND. When VCC is applied a fraction of a second afterwards the capacitor will need time to charge up before Reset isn't considered low by the chip anymore. This is done through the 10kΩ resistor R3. This takes some time proportional to RC (~10kΩ×4.7nF). Anyway that is what I guess is happening to my troublesome board.

I first thought the diode could fix that by quickly letting C8 charge up, but that would be backwards. Electrons moving one direction and current the other bit me once again...
Title: Re: The Living PCB Design Thread
Post by: vvp on Mon, 27 April 2015, 04:09:57
I see. Other devices on the same bus may have a problem if that capacitance is more than 10µF and the charging current is not limited by some other way.
Title: Re: The Living PCB Design Thread
Post by: twiddle on Mon, 27 April 2015, 09:29:07
Just figured I'd toss one of my designs in here, more as something for others to take a peek at rather than to specifically canvas feedback, but I'll not complain if anybody has any to offer (the one ratline visible is a graphical glitch, the pins are connected and DRC reports no errors).
(http://i.imgur.com/C8s9WDW.png) (http://imgur.com/C8s9WDW)

Next controller experiment. STM32F373CCT6 breakout on a 2-layer board. Figured I'd see how I went breaking *all* the I/O pins out. You can really tell the difference between this STM and the NXP/Freescale parts I was experimenting with before - I think the STM design has prioritized pin-compatibility at the expense of good routing.
Sent this off to the proto-fab, will update my controller experiments thread with the actual board and how it all goes when I get the boards.
Title: Re: The Living PCB Design Thread
Post by: vvp on Mon, 27 April 2015, 11:19:49
I'll plan to try some STM32F373 too. Not for a keyboard though.
Title: Re: The Living PCB Design Thread
Post by: sethk_ on Sat, 02 May 2015, 09:39:37
I am trying to make a USB powered LED tester, and I think this is all I need, but it is giving me errors. Any help would be appreciated! (and the diode is only there for the holes, I am putting in a throughole resistor)
(http://i.gyazo.com/d3e2b0a4aa03e2e170be676bf959307d.png)
(http://i.gyazo.com/aab5aaf869a29d48667ef4d08d02447e.png)
Title: Re: The Living PCB Design Thread
Post by: joey on Sat, 02 May 2015, 13:42:05
pwnnarwhal needed a PWR_FLAG on VBUS. (I told him on IRC and he just told me it's working!)
Title: Re: The Living PCB Design Thread
Post by: vvp on Tue, 26 May 2015, 05:44:35
This is a response to this message: https://geekhack.org/index.php?topic=62667.msg1758789#msg1758789

We tried a laminator (it can take ~2mm thick items) but it did not work well. It did not heat the toner enough to stick well. Even when we run it about 5 times through it. The best option which works fine for us is a simple iron set to "wool" setting (no idea what the actual temperature it is) and ironing just like closes. That means not a simple press and holding under preasure for some time but a sliding movements over the paper/pcb sufface. Do not use much preasure since it would flatten your traces, make them thicker, and in the worst case it could merge adjacent traces. Then put it in water about 37°C hot for about 5 minutes and rubbing the paper off with fingers and tooth brush.

This works somewhat okay with press-and-peel, but for the glossy paper it tends to make the waxes in the paper bond to the toner, and the paper is then really hard to remove and interferes with the etching process.
We may be lucky with the glossy paper from the old catalog. But what you describe is exactly what we got with the expensive photo paper. So an expensive photopaper can cause the same problems even with a good (low temperature) toner.

Small vias are a problem that is the reason I use huge Ø 1 mm vias using Ø  0.5 mm hole. Ø 0.5 mm drils are not expensive over here (it is in the range of tens of cents) and if you have a drill press then the drill will not break easily. The other thing is that all the hole driling is rather booring so we start to prefer SMD components. I'm thinking of putting a drill on my 3d Printer so that I can avoid it. But chemical etching of the traces works well enoug for us. May be we are just lucky. I think it is good for simple prototypes.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Tue, 26 May 2015, 06:15:47
Prototype batches of PCBs are pretty cheap. Maintaining a home brew process that is used only sporadically isn't quite justified for me myself. There is a bit of a wait to get the PCBs from the manufacturer, but if you can live with that I see few reasons to muck around at home any more...
Title: Re: The Living PCB Design Thread
Post by: vvp on Tue, 26 May 2015, 11:48:19
Turnaround is the only point. You can have a small PCB etched in about an hour (maybe even quicker) and drilled in another one (well maby more if you have a lot of holes).

Price may possibly be the second point. But here it depends whether you enjoy doing it (i.e. should the time be included in price?), and how reliable unregistered mail is in your location (does unregistered mail like to get lost in your area?). Or mabye you are a lucky one and there is a cheap PCB shop in your town. For me, if I would like to use a local shop (where delivery is reliable) to make one piece of 51x66 mm single side PCB then the price would be about 40 €. I can make this at home in about 2 - 3 hours for material cost of about 2 €.
Title: Re: The Living PCB Design Thread
Post by: vvp on Sat, 30 May 2015, 18:53:33
Just an example of a simple toner transfer result. This is also a bit complicated for home etching (too many holes). But easier than building it on a bread board.
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Fri, 10 July 2015, 14:06:05
I'm working on designing a business card I can give out to my friends at cons (taking inspiration from i3oilermaker ;) ) and would appreciate any feedback people may have on my design. The schematic is pretty straightforward:

(http://i.imgur.com/LqdOchCl.png) (http://i.imgur.com/LqdOchC.png)

Here's how I've laid out the parts. I'd like the keyboard to fit into a small area (currently 20x40mm) so that people can cut it down to just the one key if they want.

(http://i.imgur.com/L8vuiIjl.png) (http://i.imgur.com/L8vuiIj.png)

And here's the rest of it (still a work in progress) for anyone who is wants to see the whole project in progress.

(http://i.imgur.com/oeOKMgLl.png) (http://i.imgur.com/oeOKMgL.png)
Title: Re: The Living PCB Design Thread
Post by: komar007 on Fri, 10 July 2015, 15:33:20
Hi,
nice design, but let me share a couple quick concerns:
1. I am not entirely sure about atmega32u4, but most atmegas do not have internal pull-up resistors (or they have some very weak ones) on the RESET line, so I always put 10k there; unless you're sure it's okay like this, I'd add an extra resistor,
2. your traces look very thin (4mil?), not many places will produce such a board cheaply, if that really is 4mil, even oshpark won't do it, and they do have very good specs; I think this board should be easily routable with 8/8,
3. U$3 - why are both switch pins connected to uC lines? You could connect the other one to ground,
4. USB is based on differential D+ and D- lines, so it's recommended to keep their lengths equal and the 2 lines as close to each other as possible; I'm almost sure your design will work in most conditions, but for the highest frequency lines on board, I would try to keep them on the same layer and close to each other,
5. it is very highly recommended to put one 100nF cap for each VCC/GND pin pair of the micro, as close to the chip as possible; this will supply the higher current during peak consumption and eliminate brownout,
6. watch out for your clearances, especially around the qfn package; the pad in the middle has to be soldered (to ground, I think), so you have to make sure the soldermask completely covers those traces around it,
7. if you're going to have the board soldered, remember about proper preparation of the solder paste layer (which isn't shown here), in particular, you cannot apply a square of solder paste as big as the thermal pad of the QFN, or the chip will be lifted too high by the surface tension and the little pads will end up floating above the board; consult google for "qfn thermal pad paste pattern",
8. use thicker power lines, I suppose even 4 mil should be enough for a chip that won't take more than 30mA, but it's good practice to use significantly thicker VCC and GND lines if possible,
9. and last but not least - consider adding a ground pour (on both sides of the board), this will provide additional shielding (especially of the USB differential pair) and shorter ground loops in some cases.
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Fri, 10 July 2015, 16:23:32
Thanks for the very detailed feedback. I'm already understanding this a lot better than I did.

1. I started with the teensy schematic, which doesn't have a pull up resistor there. I actually considered not hooking up the reset at all, but I wasn't sure if I'd regret that or not. Is it worth the extra space to add the resistor too?

2. I sent a different circuit with thin traces to dirtypcbs, and that didn't seem to affect the cost. If it's more expensive at some houses to use traces that thin I'll adjust them bigger now.

3. I debated this one. It came down to it being easier to modify an existing TMK firmware if I just made a 1 switch row, but if I'm gonna make my own fork of TMK anyway it's probably not bad.

4. Good to know. I've been using the autorouter so far but maybe I should route those manually first instead.

5. At first I was gonna ask why the teensy didn't have those, but now I see I simply missed them. Adding them in.

6. I wondered about those. The autorouter likes to sneak traces in there. I'm using .1mm, perhaps with .2mm it'll avoid that.

7. I'm still debating about whether I'll have them assembled or if I'll do it myself. I probably won't make more than 15 or 20 depending on fab costs. Thanks for the pointer about the pad.

8. I'll bump those up to .3mm.

9. Sounds like the perfect finishing touch
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Fri, 10 July 2015, 18:55:19
Here's revision 2. No ground pour yet but it should incorporate all your other feedback. I couldn't fit a reset button into this iteration, will I end up regretting that?

(http://i.imgur.com/DFQLg0Jl.png) (http://i.imgur.com/DFQLg0J.png)

(http://i.imgur.com/1hHEsA3l.png) (http://i.imgur.com/1hHEsA3.png)

(Edit: uploaded the wrong images at first)
Title: Re: The Living PCB Design Thread
Post by: komar007 on Wed, 15 July 2015, 07:29:24
I like revision 2.

1. I wouldn't add a physical reset button to such a small board, I'd probably design a PCB based reset "button" - 2 exposed pads near each other that you can short with a piece of wire; as for pull-up resistor, I couldn't find in the datasheet if it's really necessary or not, so I'd still put one there just in case or at least leave a footprint which you can just not populate later;
2. if your manufactuter is OK with thin traces, then go ahead, but sometimes they'll only find out something is not within specs after manual inspection and will refuse to proceed or charge extra and I like to always keep the board compatible with a wide range of manufacturers;
3. okay, so a 1x1 matrix for compatibility with firmware, understood;
4. most autorouters are really poor, I wouldn't recommend any:/;
5. -
6. I'd say 0.2mm (8mil) is the thinnest trace to use if you don't want to limit yourself to more expensive manufacturers, that's the basic rule I use: I go below 8mil only when I need to; BTW there's nothing wrong with having traces as wide as the QFN pads and no distinction between pad and trace, provided that the solder mask has holes of the right size;
7. for a quantity of 10 or 20, dispensing solder paste onto the QFN pads will be a nightmare (although totally doable with a bit of practice), so I recommend a $5 stencil from oshstencils which makes doing this a breeze, but if you're going to use it, make sure to design the thermal pad properly, because it'll be hard to manually remove some of the excess paste from there without destroying the blobs on the pads;
8. or even to .4mm if you have the space;
9. -

10. it's good to expand the solder mask a bit (1 mil max), so that the solder mask openings are larger than the pads - this will protect you from misalignment errors which occur a lot; when choosing the solder mask expansion size, try to choose a value small enough to have the mask remain between the QFN pads or it might be hard to hot-air solder without making bridges otherwise.

Good job and good luck with the the remaining work!
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Fri, 17 July 2015, 12:36:12
And, here's revision 3. I swapped out all the generic parts with parts from seeed's catalog, they have a really good catalog for this sort of thing and an assembly service that seems pretty reasonably priced, so I won't have to deal with the most painful parts if I ever want to have a bunch made. I also swapped out the USB A connector for a card-edge connector I found in sparkfun's library. If the fab house balks at the odd shape I can always square it off and cut them myself on my CNC.

(http://i.imgur.com/5xfMfnLl.png) (http://i.imgur.com/5xfMfnL.png)

(http://i.imgur.com/mNUgxPHl.png) (http://i.imgur.com/mNUgxPH.png)

I was able to fit a full reset button into the lower left, with space for a pull-up resistor. I can leave it unpopulated initially so there are pads to be shorted, and if someone wants to drop an appropriate reset button (http://www.seeedstudio.com/depot/index.php?main_page=opl_info&opl_id=620) onto the board they can do so.

I swapped out the footprint I found online with one I made myself that has both cherry and matias compatibility. I just got a test board from bayareacircuits so I can prove it, and other than the PCB mounting holes being too small (which I can drill here, so I can salvage these boards) the footprint seems to work perfectly with both mx switches. I need to make a couple adjustments to the footprint for alps.

A friend of mine turned me onto a pretty neat web-based gerber visualizer (http://mayhewlabs.com/webGerber/). It doesn't like the drill files I send it for whatever reason but otherwise it's a great way to render a pcb before sending it off to fab:

(http://i.imgur.com/1tw4TFil.png) (http://i.imgur.com/1tw4TFi.png)

(http://i.imgur.com/t1nmw8Ul.png) (http://i.imgur.com/t1nmw8U.png)

Thanks for all your feedback.
Title: Re: The Living PCB Design Thread
Post by: twiddle on Sat, 18 July 2015, 04:42:11
Speaking of Gerber visualisation, I've had good luck with the zofzpcb tool : http://www.zofzpcb.com/Gerber-Viewer-Download.html
Windows-only unfortunately, but its free, pretty slick and has its own sanity checking functionality.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Fri, 24 July 2015, 06:44:11
I like gerbv for looking at my gerbers. It's in the Ubuntu repositories. It's very simple, most only for visual inspection, but that's generally all I need at that stage.
Title: Re: The Living PCB Design Thread
Post by: komar007 on Fri, 24 July 2015, 12:22:38
For examining gerbers, I recommend gerbv too, and also the oshpark web interface. It does a pretty good job, but doesn't have zoom, unfortunately.

@skullydazed, I also just noticed you have some wrong values of components on both the schematic and PCB.
I think you meant R1, R2 to be 22, not 22K and C3, C4 - 10pF (or a bit more), not 10uF.
As for R3, I don't know if this is a problem, but I think you're getting dangerously close to the internal weak pull-up resistance. I normally use 10K successfully for HWB, I'm not actually sure this pin is pulled-up or not during boot, but I wouldn't use more than 10K there.
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Fri, 24 July 2015, 18:23:20
@skullydazed, I also just noticed you have some wrong values of components on both the schematic and PCB.
I think you meant R1, R2 to be 22, not 22K and C3, C4 - 10pF (or a bit more), not 10uF.

I had actually noticed C3/C4 at one point, but had not noticed R1/R2. Thanks for pointing those out.

Quote
As for R3, I don't know if this is a problem, but I think you're getting dangerously close to the internal weak pull-up resistance. I normally use 10K successfully for HWB, I'm not actually sure this pin is pulled-up or not during boot, but I wouldn't use more than 10K there.

The teensy uses 1k here, and they don't seem to have any problems when that's all that there, so I assumed it was probably OK. Swapping that out for 10k is easy enough.
Title: Re: The Living PCB Design Thread
Post by: komar007 on Sat, 25 July 2015, 01:53:06
The teensy uses 1k here, and they don't seem to have any problems when that's all that there, so I assumed it was probably OK. Swapping that out for 10k is easy enough.

For R3, 1k is OK, and even shorting HWB to ground without a resistor would be okay too (unless you set it to "1" in output mode in firmware:D), it's the higher values I'm worried about.
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Fri, 31 July 2015, 11:51:44
For R3, 1k is OK, and even shorting HWB to ground without a resistor would be okay too (unless you set it to "1" in output mode in firmware:D), it's the higher values I'm worried about.

Ah, yes, I missed updating that in this project. I have 3 different keyboard projects going now, I keep discovering new bugs/improvements in one and haven't gotten good at applying them back to the others. That's part of the fun of this stuff, figuring out good systems for keeping everything in sync.
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Fri, 31 July 2015, 12:13:18
I've just published the eagle footprints I developed (https://github.com/skullydazed/clueboard_eagle). Right now there are 5 variants:


All variants except for ALPSMX-2SWITCH-0.5-LED have been proven electrically:

(http://i.imgur.com/wJgAGzO.jpg)

I have not had anything made since creating ALPSMX-2SWITCH-0.5-LED yet, but I will be sending something off to the fab house next week.

I know a lot of people are using KiCad or gEDA since eagle is so expensive, but if anyone else is using eagle I hope you will find these useful.
Title: Re: The Living PCB Design Thread
Post by: Zustiur on Tue, 04 August 2015, 20:58:47
I am really really confused right now. I copied down the lib and mod files from the geekhack repository, and the lib provided by Moz.
First let me say that those two things are not related. I believe you can use one or the other.
Secondly, it appears kiCAD has gone through a version upgrade since then and no longer expects .lib and .mod files. I am using the current stable version for windows, installed from kicad-product-r5528.036404d-x86_64.exe
I managed to import all the footprints from the above sources into a new lib.pretty folder and they are saved as .kicad_mod files.
However. None of the footprints provided by Moz seem to correspond with the switch/diode pair which I think also came from Moz.
There also does not appear to be a teensy footprint anywhere. Is that correct?
I was planning an ergodox style flippable board, and the switch footprints don't look flippable to me.

The tutorials I've seen so far (written and video) are either amateurish or incomplete. They also seem to be using older versions of kiCad.

Will I need to just create the footprints myself?
Title: Re: The Living PCB Design Thread
Post by: swill on Fri, 07 August 2015, 15:31:53
I would like to get some feedback from the experts in this thread about something that has been taking up a lot of my brainspace recently.

Most of you probably have checked out my plate/case tool builder.swillkb.com (http://builder.swillkb.com/) at this point.  When I started that project I had the pipe dream of being able to take a JSON input and generate the plate, case, pcb and firmware for a custom keyboard layout in a few clicks.  Obviously, that was way too ambitious for a first pass, so I just started with what I could reasonably bite off and built the plate/case builder.  skullydazed has put together a pretty cool tool (http://kalerator.clueboard.co/) to help create EAGLE scripts based on the same Keyboard Layout Editor input (GH Thread (https://geekhack.org/index.php?topic=74139.msg1819651#msg1819651)).  His tool is written in Python, so I open sourced my original builder engine (https://github.com/swill/kb_builder) which was also written in Python.  It would be cool if someone wanted to integrate those two code bases, but thats not what this post is about.

I am not sure that creating EAGLE scripts is really the best way to solve this problem for my tool because most people won't be able to validate or even open them.  It is just too hard of a format for the regular person to work with.

I am currently looking into producing Gerber files from my tool to define the PCB design.  The Gerber files would have corresponding SVG files so you could visually inspect that the output is what you expect.  The Gerber files would be generated from these SVG files, so you could be confident with what is in the Gerber file without having the means to actually view it.  I would also be exposing a tool for being able to convert an SVG to Gerber file, so if you would like to modify the layout in any way, you could modify the SVG and then reupload it and get the resulting Gerber files.

There are many obstacles in my way to be able to actually make this work.  Including, but not limited to:

Before I go too far down this road, I am interested in feedback on this approach.  Am I sane?  Given that I am really focusing my tool on builders who have ideas but don't have the technical means to be able to do every step, is this realistic from a usability and modification perspective?  If you don't think this is realistic, how would you approach the problem and what would you be targeting to produce?

I understand the complexity of what I am trying to do here is pretty crazy and it won't be something I develop in a few weeks, this is going to take all my free time for months.  That being said, I really want to orient my self so I start moving in at least close to the right direction.  :P

I appreciate all feedback, regardless of what you have to say.  :)  Cheers...
Title: Re: The Living PCB Design Thread
Post by: VinnyCordeiro on Fri, 07 August 2015, 18:00:17
I would like to get some feedback from the experts in this thread about something that has been taking up a lot of my brainspace recently.

Most of you probably have checked out my plate/case tool builder.swillkb.com (http://builder.swillkb.com/) at this point.  When I started that project I had the pipe dream of being able to take a JSON input and generate the plate, case, pcb and firmware for a custom keyboard layout in a few clicks.  Obviously, that was way too ambitious for a first pass, so I just started with what I could reasonably bite off and built the plate/case builder.  skullydazed has put together a pretty cool tool (http://kalerator.clueboard.co/) to help create EAGLE scripts based on the same Keyboard Layout Editor input (GH Thread (https://geekhack.org/index.php?topic=74139.msg1819651#msg1819651)).  His tool is written in Python, so I open sourced my original builder engine (https://github.com/swill/kb_builder) which was also written in Python.  It would be cool if someone wanted to integrate those two code bases, but thats not what this post is about.

I am not sure that creating EAGLE scripts is really the best way to solve this problem for my tool because most people won't be able to validate or even open them.  It is just too hard of a format for the regular person to work with.

I am currently looking into producing Gerber files from my tool to define the PCB design.  The Gerber files would have corresponding SVG files so you could visually inspect that the output is what you expect.  The Gerber files would be generated from these SVG files, so you could be confident with what is in the Gerber file without having the means to actually view it.  I would also be exposing a tool for being able to convert an SVG to Gerber file, so if you would like to modify the layout in any way, you could modify the SVG and then reupload it and get the resulting Gerber files.

There are many obstacles in my way to be able to actually make this work.  Including, but not limited to:
  • Develop the ability to generate Gerber files from an SVG
  • Develop an autorouter that will deterministically output SVG files for any keyboard layout
  • Implement the autorouter into the core engine of my tool

Before I go too far down this road, I am interested in feedback on this approach.  Am I sane?  Given that I am really focusing my tool on builders who have ideas but don't have the technical means to be able to do every step, is this realistic from a usability and modification perspective?  If you don't think this is realistic, how would you approach the problem and what would you be targeting to produce?

I understand the complexity of what I am trying to do here is pretty crazy and it won't be something I develop in a few weeks, this is going to take all my free time for months.  That being said, I really want to orient my self so I start moving in at least close to the right direction.  :P

I appreciate all feedback, regardless of what you have to say.  :)  Cheers...

Since version 6 (I think) all EAGLE files are written in XML. So you can try to directly generate a XML file that is a valid schematic and/or PCB. Will need to deal with customs libraries for the MX switches, but other components (like diodes, through hole or SMD) are probably already supported with standard EAGLE libraries. I can say that ATmega32u4 microcontroller requires a custom library.
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Fri, 07 August 2015, 19:18:38
I am not sure that creating EAGLE scripts is really the best way to solve this problem for my tool because most people won't be able to validate or even open them.  It is just too hard of a format for the regular person to work with.

I agree with you here, but the problem is that the other PCB tools are even harder for most people to work with. Before I settled on using EAGLE I tried to get gEDA and KiCAD going and while I was able to make them work every step was a challenge.

I am currently looking into producing Gerber files from my tool to define the PCB design.  The Gerber files would have corresponding SVG files so you could visually inspect that the output is what you expect.  The Gerber files would be generated from these SVG files, so you could be confident with what is in the Gerber file without having the means to actually view it.  I would also be exposing a tool for being able to convert an SVG to Gerber file, so if you would like to modify the layout in any way, you could modify the SVG and then reupload it and get the resulting Gerber files.

Generating the gerbers is only half the challenge. You have to get them made too. I haven't been able to find a fab house to make single keyboard-sized PCB's for less than about $80, and it takes a few weeks to get them at that price. People can etch the board themselves for less than $50, but for that they just need SVG (or something else they can print from accurately.)

The ability to edit the layout will be necessary too, and I think your SVG approach may the best choice for that. However, you will have to deal with error detection. For example, what if they cross two traces, or run a trace through the middle of the MX switch's hole? If you can design a UI that prevents them from making those mistakes in the first place it'd be a lot more work on the frontend, but also more user friendly and potentially saves you having to catch a million corner cases in your SVG processing code.

Before I go too far down this road, I am interested in feedback on this approach.  Am I sane?  Given that I am really focusing my tool on builders who have ideas but don't have the technical means to be able to do every step, is this realistic from a usability and modification perspective?  If you don't think this is realistic, how would you approach the problem and what would you be targeting to produce?

I understand the complexity of what I am trying to do here is pretty crazy and it won't be something I develop in a few weeks, this is going to take all my free time for months.  That being said, I really want to orient my self so I start moving in at least close to the right direction.  :P

I'm pretty sure that thinking about tackling a project like this rules out sanity. ;D I think the approach you're looking at can work, and work quite well. I think you are probably underestimating how hard it will be to route the columns (or rows for row-staggered keyboards) when you write your autorouter, but perhaps I'm just overestimating it.

Since version 6 (I think) all EAGLE files are written in XML. So you can try to directly generate a XML file that is a valid schematic and/or PCB. Will need to deal with customs libraries for the MX switches, but other components (like diodes, through hole or SMD) are probably already supported with standard EAGLE libraries. I can say that ATmega32u4 microcontroller requires a custom library.

Both seeedstudio and sparkfun publish open libraries with footprints for those parts. I prefer the seeed version because it has outlines for automatic pick-n-place, which is actually cheaper than you might imagine.
Title: Re: The Living PCB Design Thread
Post by: VinnyCordeiro on Fri, 07 August 2015, 19:56:00
Both seeedstudio and sparkfun publish open libraries with footprints for those parts. I prefer the seeed version because it has outlines for automatic pick-n-place, which is actually cheaper than you might imagine.
That's new to me, thank you for the information.
Title: Re: The Living PCB Design Thread
Post by: twiddle on Sat, 08 August 2015, 02:34:01

Generating the gerbers is only half the challenge. You have to get them made too. I haven't been able to find a fab house to make single keyboard-sized PCB's for less than about $80, and it takes a few weeks to get them at that price.

On that note, check out pcbshopper - I just tested with 130mm x 350mm dimensions (roughly the size of the phantom plate I have lying about, presuming it's fairly indicative of the size of the PCB underneath), 2 layer with HASL and standard solder mask, quantity 5, and was quoted $150 US including shipping for a 5 day turn around with PCBWay, and $120+ shipping via Smart-prototyping. YMMV (I find sometimes the actual order page has slightly different pricing) but I think you'll find that getting a small batch fabbed is actually feasible now. Just takes a couple mates who want the same switch layout, and it becomes surprisingly affordable.

Given that I'm not really interested in anything other than scratchbuilt boards with my own PCB designs, I don't have a lot to add to the feasibility of the tools proposed other than to say that autorouting is a fairly significant issue, but perhaps some of Kicad's source might give insight there.
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Sat, 08 August 2015, 09:22:26
On that note, check out pcbshopper - I just tested with 130mm x 350mm dimensions (roughly the size of the phantom plate I have lying about, presuming it's fairly indicative of the size of the PCB underneath), 2 layer with HASL and standard solder mask, quantity 5, and was quoted $150 US including shipping for a 5 day turn around with PCBWay, and $120+ shipping via Smart-prototyping. YMMV (I find sometimes the actual order page has slightly different pricing) but I think you'll find that getting a small batch fabbed is actually feasible now. Just takes a couple mates who want the same switch layout, and it becomes surprisingly affordable.

You are right, the main cost here is the setup. If you can get others to go in with you it'll save you a lot.

I've been experimenting a bit with PCB fab at home, actually. I tried the toner transfer method which works but was a few hours of work. This weekend I'm going to try out the photoresist method to see how that works for me. I want to do a lot of experimentation with layouts and spending $25 on the raw materials (and getting my results the same day) is very appealing to me.
Title: Re: The Living PCB Design Thread
Post by: swill on Sat, 08 August 2015, 21:53:44

Sorry for the delay to get some responses in here.  I had company the last couple days, so I have not had a chance to sit down at the computer for a little while.


On that note, check out pcbshopper - I just tested with 130mm x 350mm dimensions (roughly the size of the phantom plate I have lying about, presuming it's fairly indicative of the size of the PCB underneath), 2 layer with HASL and standard solder mask, quantity 5, and was quoted $150 US including shipping for a 5 day turn around with PCBWay, and $120+ shipping via Smart-prototyping. YMMV (I find sometimes the actual order page has slightly different pricing) but I think you'll find that getting a small batch fabbed is actually feasible now. Just takes a couple mates who want the same switch layout, and it becomes surprisingly affordable.

You are right, the main cost here is the setup. If you can get others to go in with you it'll save you a lot.

I've been experimenting a bit with PCB fab at home, actually. I tried the toner transfer method which works but was a few hours of work. This weekend I'm going to try out the photoresist method to see how that works for me. I want to do a lot of experimentation with layouts and spending $25 on the raw materials (and getting my results the same day) is very appealing to me.


What are the most common file types that fab shops will take?  I would like to be generating SVG files natively and then converting them into the final form if possible.  So image based formats are better for me.  It also makes the modification of the files more accessible because anyone can use Inkscape or Adobe Illustrator to make basic modifications.  If I can do that, then I would be relying on a format converter (SVG to Whatever), so I could easily accept anyone's SVG (in theory).  I think scripting is a totally valid way to solve this, but I think it is going to be less accessible for people.  None will have tools to check it and making modifications will be impossible for the general user group.

Is there a graphics format and a different format for the drilling of the holes?  How does this work and what would I need to produce?


I am not sure that creating EAGLE scripts is really the best way to solve this problem for my tool because most people won't be able to validate or even open them.  It is just too hard of a format for the regular person to work with.

I agree with you here, but the problem is that the other PCB tools are even harder for most people to work with. Before I settled on using EAGLE I tried to get gEDA and KiCAD going and while I was able to make them work every step was a challenge.


Yes, this is why I would like to see if I can make an image based model work.  I think people will have a lot harder time if they have to learn an actual PCB design software to use what they were provided.  What formats does KiCAD use natively?  Basic premise of that format?  That seems like the most accessible of the different PCB modeling softwares.  What formats CAN it export into?


I am currently looking into producing Gerber files from my tool to define the PCB design.  The Gerber files would have corresponding SVG files so you could visually inspect that the output is what you expect.  The Gerber files would be generated from these SVG files, so you could be confident with what is in the Gerber file without having the means to actually view it.  I would also be exposing a tool for being able to convert an SVG to Gerber file, so if you would like to modify the layout in any way, you could modify the SVG and then reupload it and get the resulting Gerber files.

Generating the gerbers is only half the challenge. You have to get them made too. I haven't been able to find a fab house to make single keyboard-sized PCB's for less than about $80, and it takes a few weeks to get them at that price. People can etch the board themselves for less than $50, but for that they just need SVG (or something else they can print from accurately.)


Yes, exactly.  I think that an SVG is a good format to start with because I think it would enable people being able to experiment with making PCBs as well.  I see people probably doing micro-GBs and getting like 5 PCBs made at a time to bring the costs down.  Would Gerber files be a good fit for that type of use case?


The ability to edit the layout will be necessary too, and I think your SVG approach may the best choice for that. However, you will have to deal with error detection. For example, what if they cross two traces, or run a trace through the middle of the MX switch's hole? If you can design a UI that prevents them from making those mistakes in the first place it'd be a lot more work on the frontend, but also more user friendly and potentially saves you having to catch a million corner cases in your SVG processing code.


I agree that using a format that can be easily edited is a good idea.

Your points are valid about the 'error detection'.  I think my ability to write an autorouter that will fit into my application cleanly is going to be a pretty central aspect to my success doing this.  I would be trying to make it so people would not have to modify it and I could validate what the autorouter has produced by showing each of the layers on its own and showing an SVG of the layers superimposed on each other with different colors.  I would be focusing on trying to make sure there are no errors produced by my autorouter, but I would probably not be checking the files if someone uploaded their own SVG because I won't have all of the parameters of the PCB in the system when I do the SVG to Gerber (or whatever) process unless the routing of the PCB has been generated by my tool in that instance.  Hope that makes sense...


Before I go too far down this road, I am interested in feedback on this approach.  Am I sane?  Given that I am really focusing my tool on builders who have ideas but don't have the technical means to be able to do every step, is this realistic from a usability and modification perspective?  If you don't think this is realistic, how would you approach the problem and what would you be targeting to produce?

I understand the complexity of what I am trying to do here is pretty crazy and it won't be something I develop in a few weeks, this is going to take all my free time for months.  That being said, I really want to orient my self so I start moving in at least close to the right direction.  :P

I'm pretty sure that thinking about tackling a project like this rules out sanity. ;D I think the approach you're looking at can work, and work quite well. I think you are probably underestimating how hard it will be to route the columns (or rows for row-staggered keyboards) when you write your autorouter, but perhaps I'm just overestimating it.


Yes, I am going to have to do a bit of a refresher on different algorithms and graph theory I took in Uni.  I also need to study all the the PCBs I have here to get a feel for how they run everything.  I am guessing that in general they will probably run the rows on one side and the columns on the other side of the PCB?  That may be way too simplistic for the real complexity, but would make sense for making things not cross and such.  I suspect I am going to be writing a lot of proximity algorithms.  Haha...  The autorouter is the one piece that I feel the most intimidated by.  I have a pretty solid grasp on the rest (I think), at least in theory.  We will see how I do I guess...


Since version 6 (I think) all EAGLE files are written in XML. So you can try to directly generate a XML file that is a valid schematic and/or PCB. Will need to deal with customs libraries for the MX switches, but other components (like diodes, through hole or SMD) are probably already supported with standard EAGLE libraries. I can say that ATmega32u4 microcontroller requires a custom library.

Both seeedstudio and sparkfun publish open libraries with footprints for those parts. I prefer the seeed version because it has outlines for automatic pick-n-place, which is actually cheaper than you might imagine.


Producing an XML would not be too much different from creating an SVG, but I am not sure its the same style of information.  I am guessing it is probably represents the movements and order and then pulls from a catalog of parts or something like that (similar to the EAGLE script concept)?  I need to spent a couple weeks and just get my head into all the different aspects of what I will need to be doing.  I am kind of testing the waters now and trying to validate my ideas before I get too deep into research.  Bear with me...  :P

Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sun, 09 August 2015, 11:45:50
To be honest I didn't read everything in the previous posts, but have you looked at the specifications for the gerber file format? It's v e r y simple. If you know your way around svg's (which I don't) learning gerber should be a walk in the park. It's a very simple vectorized thing, translating from something else vectorized should be decently straight forward.. Gerbers are the standard in PCB manufacturing (to my knowledge). Any serious manufacturer should accept them.

The specification is linked from this page http://www.ucamco.com/downloads
Title: Re: The Living PCB Design Thread
Post by: swill on Sun, 09 August 2015, 13:14:50
To be honest I didn't read everything in the previous posts, but have you looked at the specifications for the gerber file format? It's v e r y simple. If you know your way around svg's (which I don't) learning gerber should be a walk in the park. It's a very simple vectorized thing, translating from something else vectorized should be decently straight forward.. Gerbers are the standard in PCB manufacturing (to my knowledge). Any serious manufacturer should accept them.

The specification is linked from this page http://www.ucamco.com/downloads
Awesome. Thanks for this, I will check that out.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sun, 09 August 2015, 13:44:19
Actually I just discovered that there has been an update to the new X2 format. I've read the documentation for the RS-274X version. They are supposed to be both back and forward compatible, and still just about as simple. The new documentation is a good number of pages longer. I can't say anything about the new documentation, but the old document had simple detailed explained examples. I'm sure the new one is along the same lines.
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Sun, 09 August 2015, 13:54:43
What are the most common file types that fab shops will take?  I would like to be generating SVG files natively and then converting them into the final form if possible.  So image based formats are better for me.  It also makes the modification of the files more accessible because anyone can use Inkscape or Adobe Illustrator to make basic modifications.  If I can do that, then I would be relying on a format converter (SVG to Whatever), so I could easily accept anyone's SVG (in theory).  I think scripting is a totally valid way to solve this, but I think it is going to be less accessible for people.  None will have tools to check it and making modifications will be impossible for the general user group.

Is there a graphics format and a different format for the drilling of the holes?  How does this work and what would I need to produce?
[/tt]

Gerber is THE standard. Some shops take gerber drill files and other shops take Excellon (https://en.wikipedia.org/wiki/Excellon_format) but the rest of the layers are always gerber (RS-247x) files. (bpiphany already gave you the same encouragement I would have.)

Yes, exactly.  I think that an SVG is a good format to start with because I think it would enable people being able to experiment with making PCBs as well.  I see people probably doing micro-GBs and getting like 5 PCBs made at a time to bring the costs down.  Would Gerber files be a good fit for that type of use case?
[/tt]

If your goal is to let people do micro-groupbuys (great goal btw) gerber is a must.

Yes, I am going to have to do a bit of a refresher on different algorithms and graph theory I took in Uni.  I also need to study all the the PCBs I have here to get a feel for how they run everything.  I am guessing that in general they will probably run the rows on one side and the columns on the other side of the PCB?  That may be way too simplistic for the real complexity, but would make sense for making things not cross and such.  I suspect I am going to be writing a lot of proximity algorithms.  Haha...  The autorouter is the one piece that I feel the most intimidated by.  I have a pretty solid grasp on the rest (I think), at least in theory.  We will see how I do I guess...
[/tt]

Rows on one side and columns on the other is exactly how I connect mine up. If you only need to connect rows/columns (no controller connections) it's probably pretty easy to write an auto-router for. Once you want to start adding traces for a controller is where it'll get complex.
Title: Re: The Living PCB Design Thread
Post by: Zustiur on Sat, 22 August 2015, 01:31:09
I'm still confused. I just can't get the library part of kicad to work properly.
Even using the tutorial files from https://github.com/BathroomEpiphanies/KiCAD-Keyboard-Tutorial when I click on Cvpcb I get an error message warning me that it can't autolink the components:
---------------------------
Some of the assigned footprints are legacy entries (are missing lib nicknames). Would you like CvPcb to attempt to convert them to the new required FPID format? (If you answer no, then these assignments will be cleared out and you will have to re-assign these footprints yourself.)
---------------------------
Yes   No   
---------------------------
Doesn't matter which way I answer, the result is that none of the components have footprints assigned.


I tried adding the lib and mod files that came with the tutorial but when I select 'footprint' from the list on the left, no components appear on the right.
Could someone (using the current version of kicad) please explain how to import the MX switches, diodes and teensy controller into my project so that I can use them in all the necessary places?
Title: Re: The Living PCB Design Thread
Post by: mrflow3r on Sat, 22 August 2015, 02:55:43
I'm still confused. I just can't get the library part of kicad to work properly.
Even using the tutorial files from https://github.com/BathroomEpiphanies/KiCAD-Keyboard-Tutorial when I click on Cvpcb I get an error message warning me that it can't autolink the components:
---------------------------
Some of the assigned footprints are legacy entries (are missing lib nicknames). Would you like CvPcb to attempt to convert them to the new required FPID format? (If you answer no, then these assignments will be cleared out and you will have to re-assign these footprints yourself.)
---------------------------
Yes   No   
---------------------------
Doesn't matter which way I answer, the result is that none of the components have footprints assigned.


I tried adding the lib and mod files that came with the tutorial but when I select 'footprint' from the list on the left, no components appear on the right.
Could someone (using the current version of kicad) please explain how to import the MX switches, diodes and teensy controller into my project so that I can use them in all the necessary places?

Which build are you running on? I have 7-15-2015 build running on Windows 10. I don't see such message. Also Kicad forum is pretty active. You should post there too. You will get an answer in matter of hours!
Title: Re: The Living PCB Design Thread
Post by: Zustiur on Sat, 22 August 2015, 23:40:50
I installed it from kicad-product-r5528.036404d-x86_64.exe
I believe that is 2015-04-13. I figured I was better off using the 'stable' versions rather than debug versions. Judging by the date you mentioned, you got your copy from somewhere else entirely. That date isn't listed here: http://www2.futureware.at/~nickoe/ which I reached from http://www.kicad-pcb.org/display/KICAD/Installing+KiCad#InstallingKiCad-Windows
Title: Re: The Living PCB Design Thread
Post by: BlueNalgene on Sun, 23 August 2015, 00:02:43
I'm still confused. I just can't get the library part of kicad to work properly.
Even using the tutorial files from https://github.com/BathroomEpiphanies/KiCAD-Keyboard-Tutorial when I click on Cvpcb I get an error message warning me that it can't autolink the components:
---------------------------
Some of the assigned footprints are legacy entries (are missing lib nicknames). Would you like CvPcb to attempt to convert them to the new required FPID format? (If you answer no, then these assignments will be cleared out and you will have to re-assign these footprints yourself.)
---------------------------
Yes   No   
---------------------------
Doesn't matter which way I answer, the result is that none of the components have footprints assigned.


I tried adding the lib and mod files that came with the tutorial but when I select 'footprint' from the list on the left, no components appear on the right.
Could someone (using the current version of kicad) please explain how to import the MX switches, diodes and teensy controller into my project so that I can use them in all the necessary places?

I can't reproduce your error.

I downloaded the zip file, extracted and ran KiCAD.  Then opened the tutorial.pro file.  I checked Eeschema, nothing unusual.  I checked Cvpcb, nothing unusual.  It looked like this:

(http://i.imgur.com/eTV0Tk8.png)

I checked pcbnew, it brought up a small error window:

(http://i.imgur.com/9N6cqtP.png)

Upon clicking OK, it brought up the board, and it looked like what I would expect.

(http://i.imgur.com/PVQWHrs.png)


Can you confirm you followed these steps?
Title: Re: The Living PCB Design Thread
Post by: Zustiur on Sun, 23 August 2015, 01:31:35
I've just reinstalled kicad.
Then reextracted the tutorial
As with you, Then opened the tutorial.pro file.  I checked Eeschema, nothing unusual.
But then: when I click on Cvpcb I get the error message previously noted:
---------------------------
Confirmation
---------------------------
Some of the assigned footprints are legacy entries (are missing lib nicknames). Would you like CvPcb to attempt to convert them to the new required FPID format? (If you answer no, then these assignments will be cleared out and you will have to re-assign these footprints yourself.)
---------------------------
Yes   No   

I select Yes and it gives me this message:
The following errors occurred attempting to convert the footprint assignments:

Component 'D0:0' footprint 'DIODE' was not found in any library.

Component 'D0:1' footprint 'DIODE' was not found in any library.

Component 'D0:2' footprint 'DIODE' was not found in any library.

Component 'D0:7' footprint 'DIODE' was not found in any library.

Component 'D0:10' footprint 'DIODE' was not found in any library.

Component 'D0:11' footprint 'DIODE' was not found in any library.

Component 'D0:12' footprint 'DIODE' was not found in any library.

Component 'D0:13' footprint 'DIODE' was not found in any library.

Component 'D1:0' footprint 'DIODE' was not found in any library.

Component 'D1:2' footprint 'DIODE' was not found in any library.

Component 'D1:3' footprint 'DIODE' was not found in any library.

Component 'D1:4' footprint 'DIODE' was not found in any library.

Component 'D1:5' footprint 'DIODE' was not found in any library.

Component 'D1:6' footprint 'DIODE' was not found in any library.

Component 'D1:7' footprint 'DIODE' was not found in any library.

Component 'D1:8' footprint 'DIODE' was not found in any library.

Component 'D1:9' footprint 'DIODE' was not found in any library.

which goes on and on...

Your screen cap of Cvpcb looks different. I have 3 'panes' the left pane is for categories, then the middle and right panes look like yours.

PCBNew gives me the same warning as you and appears to display properly.


If I add switches and diodes to the eeschematic, then generate netlist and go to Cvpcb there does not appear to be any way to assign the existing types in use (DIODE, CHERRY_PCB_100H) etc. They don't appear as options I can select anywhere. What is the correct way to add them to the library so that I can assign them to my new keys?
Title: Re: The Living PCB Design Thread
Post by: mrflow3r on Sun, 23 August 2015, 01:45:50
I installed it from kicad-product-r5528.036404d-x86_64.exe
I believe that is 2015-04-13. I figured I was better off using the 'stable' versions rather than debug versions. Judging by the date you mentioned, you got your copy from somewhere else entirely. That date isn't listed here: http://www2.futureware.at/~nickoe/ which I reached from http://www.kicad-pcb.org/display/KICAD/Installing+KiCad#InstallingKiCad-Windows

Ah, I am using the nightly build from http://www2.futureware.at/~nickoe/ (http://www2.futureware.at/~nickoe/). It has been working well for me.
Title: Re: The Living PCB Design Thread
Post by: Zustiur on Sun, 23 August 2015, 02:20:20
Of course... I realize now that the most recent build is NOT at the top of the list... Hmm. Will try a new one.
Ok, Now when I go to Cvpcb I get no error, but it has blanked out all of the footprint assignments.
(http://i135.photobucket.com/albums/q128/Zustiur/GeekHack/kicad.png) (http://s135.photobucket.com/user/Zustiur/media/GeekHack/kicad.png.html)
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Wed, 09 September 2015, 09:05:35
I recently received the first batch of my business cards back from the assembly house. They work great if you can plug them into the USB port, but I've already found a lot of machines where it doesn't quite make contact. For revision 2 I've extended that out another MM which will fix the clearance issues on every machine I've tried.

(http://i.imgur.com/VGYDmlzl.jpg) (http://i.imgur.com/VGYDmlz.jpg)

I'm still working some software issues out (and trying to get some working code for that ws2812) but the hardware seems to work great.
Title: Re: The Living PCB Design Thread
Post by: potatowire on Wed, 09 September 2015, 14:37:12
They look awesome!
Title: Re: The Living PCB Design Thread
Post by: DrOizo on Thu, 10 September 2015, 07:34:02
I did just paste the description from the EAGLE Website if you still need it:

- 3 modules with identical user interfaces
- Hundreds of video tutorials available
- Regular free online trainings and free support through dedicated experts
- Active user forums that help solve design problems and give guidance
- User manual available for download or accessible from the software
- Compatible with Windows®, Linux® and Mac®
- Available in 32- and 64-bit versions
- Tens of thousands of free component libraries available
- Extensions (User Language Programs (ULPs)) that allow for customized features
- Large ecosystems of integrated 3rd party solutions (e.g. 3D,Simulation, Signal Integrity)
- Windows XP, Windows Vista, Windows 7, Windows 8.
- The 64 bit EAGLE version requires a 64 bit version of the operating system.[/li][/list]
- Linux based on kernel 2.6 for Intel computers, X11 with a minimum color depth of 8 bpp, libssl.so.1.0.0 and libcrypto.so.1.0.0. For the 64-bit version a 64 bit operating system is required and libc.so.6 with sub version GLIBC_2.14 or higher.
- Mac OS X version 10.8 to 10.10 for Intel computer.[/li][/list]


(http://www.cadsoftusa.com/eagle-pcb-design-software/about-eagle/)
Title: Re: The Living PCB Design Thread
Post by: NicolasK on Thu, 24 September 2015, 02:13:59
10 checking rules after PCB layout

1.PCB size is the same with the size wanted? The layout is convenient for PCB manufacturing? With fiducial markings and position holes to make the alignment?

2.Is there components conflict on a two-dimensional, three-dimensional view?

3.Components position in layout is properly in density and order, looks neat? Whether all features finished?

4. Components need frequent replacement can be easily replaced? The PCBA can be easily fixed in to the shell?

5.Are there proper distance between the thermal component and the heat emitting Component?

6.The component need adjusting while using is convenient to adjust?

7.For the place will emit heat, is a thermal radiator installed? Air flow condition is smooth?

8.Signal flow is smooth and the connection is shortest?

9.Are plugs, sockets design compliant with other mechanical design rules?

10.if Interference between lines been considered?
Title: Re: The Living PCB Design Thread
Post by: Eszett on Tue, 29 September 2015, 01:28:02
Any chance of including PCB mount cherry footprints library, into the KiCAD ressource? Since my gateron switches come with extra pins (PCB mount).
Title: Re: The Living PCB Design Thread
Post by: dscpcb on Tue, 29 September 2015, 06:06:54
To learn PCB designing basis i believe Spark fun is offering great series of tutorials. Just try out learn.sparkfun.com/tutorials/pcb-basics
Hope it Helps. Best of Luck ! :thumb:
Title: Re: The Living PCB Design Thread
Post by: Eszett on Tue, 29 September 2015, 10:45:11
I have a question about the AtMega32u4. Some schematics show a pullup-resistor at the RESET pin, some don't. Why? Is the pull-up necessary or not?
Title: Re: The Living PCB Design Thread
Post by: vvp on Wed, 30 September 2015, 12:26:54
There is an internal pull up of about 50 kΩ in the chip itself. It is rare that one more external pull up is needed. If your reset network is well insulated then you do not need the additional external pull up.
Title: Re: The Living PCB Design Thread
Post by: Eszett on Wed, 30 September 2015, 13:09:27
Very well then, thanks VVP!
Title: Re: The Living PCB Design Thread
Post by: komar007 on Wed, 30 September 2015, 13:17:38
I have a question about the AtMega32u4. Some schematics show a pullup-resistor at the RESET pin, some don't. Why? Is the pull-up necessary or not?
I've PM'd you, but I guess here is the better place to share this.

Atmel claims in their AVR042 application note (http://www.atmel.com/images/atmel-2521-avr-hardware-design-considerations_applicationnote_avr042.pdf) that:
Quote
The reset line has an internal pull-up resistor, but if the environment is noisy it can be insufficient and reset can
therefore occur sporadically. Refer to datasheet for value of pull-up resistor on specific devices.
So I always use an external 10k. But I guess that in 99% of cases it is OK not to put one there.
Title: Re: The Living PCB Design Thread
Post by: BlueNalgene on Wed, 30 September 2015, 13:54:51
I've PM'd you, but I guess here is the better place to share this.

Thanks for sharing here.  I learn by lurking.
Title: Re: The Living PCB Design Thread
Post by: Eszett on Thu, 01 October 2015, 00:27:42
Thanks Komar. Is my basic circuit looking fine? Some things which are still unclear to me are:
-- can I spare myself the LED on D6 or do I better keep it for debugging?
-- can I spare myself the whole pushbutton thing on Reset at all (and short Reset with GND if I need a reset)?
-- what's the reason for the resistor at HWB (pin E2)?
-- why do UVCC, UCAP require larger decoupling capacitors?
-- why does VBUS require no decoupling capacitor?
Title: Re: The Living PCB Design Thread
Post by: vvp on Fri, 02 October 2015, 15:20:21
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sat, 03 October 2015, 02:13:38
Well explained. Only to add something on Ucap.

To my understanding the Ucap pin comes from an internal voltage regulator and carries 3.3V which is needed for the USB communication in some way. The cap is to keep this voltage stable. I believe you may even get away with drawing a small current from that pin if you need 3.3V for something. And I am not sure what would happen if you left it out. If you only loose USB or if the chip fails to run at all...
Title: Re: The Living PCB Design Thread
Post by: Eszett on Sun, 04 October 2015, 17:32:19
VVP, thank you for the extensive and clear answers. Im still in doubt about the need of the capacitor at VBus. The design guidelines write "A 10µF capacitor is highly recommended on VBUS line". And I have difficulties with such sentences. What does "recommended" mean? For what case is it recommended? What happens if I don't use a capacitor? In my understanding of informatics there is rather "it works" or "it doesn't", than "is recommended".
Title: Re: The Living PCB Design Thread
Post by: joey on Sun, 04 October 2015, 17:34:08
Recommended = do it.
Title: Re: The Living PCB Design Thread
Post by: vvp on Mon, 05 October 2015, 04:29:36
In general it is as joey said: if some part is recommended and you are not sure that you do not need it than just put it there.

As for as this specific VBus capacitor:
The only question is how big the capacitor should be. Personally I would like to have there as big capacitor as possible but hasu pointed out in this very thread that USB specification limits the maximum capacitance of an USB device to 10 µF (https://geekhack.org/index.php?topic=48851.msg1729111#msg1729111). So that is the upper limit for the capacitance of your whole PCB. In practice this often means that you need to use a lover value. In your case the maximum is about 10 µF - 4 * 0.1 µF - 1 µF (*). If you would add more capacitors (e.g. a better filtering of AVcc) then the value needs to be even lower if you are not making sure the inrush current is low enough in some special way.
If you know the exact dimensions of the circuit wires and the maximum interference (in addition to circuit topology and specs of all the parts) than you can compute the minimum required VBus capacitor precisely but it is just easier to put there something near the maximum value USB specification allows for your circuit.

(*) Maybe you do not need to subtract the 1 µF Ucap (it depends how the chip is charging Ucap). When in doubt then rather subtract it. Your circuit will be slightly more sensitive to interference but you run less risk that connecting your device to the USB bus will reset other USB devices on the same bus.

Edit: Clarify.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 05 October 2015, 04:41:55
Not knowing better I put a 10µF electrolytic capacitor between VBUS and GND on my designs, in addition to the ceramic bypass capacitors. I used up to 3×1µF bypass (+some lower values) and haven't heard anyone having trouble with their USB ports giving up on them. There may be physical factors limiting the inrush current in other ways by coincidence, but I would change to a smaller cap for future designs, probably 4.7µF since that is a common value.

The Teensy2.0 has a 1µF bypass cap on VBUS/UVCC. I don't know if the recommendation is that high, but you could say that is working towards the recommended 10µF.. There are also 4×0.1µF in there, so in total 1.4µF. And the Teensy is also intended as a dev board and perhaps shouldn't be trusted to be stable for commercial applications, or the larger capacitance should be placed outside the Teensy.
Title: Re: The Living PCB Design Thread
Post by: vvp on Mon, 05 October 2015, 13:11:53
I had bad capacitors too. I just took an example schematic for 5V to 3.3V LDO and it had 10 µF before and 10 µF after the LDO. Plus a separate LC filter with 10 µF for Avcc. I did not even think about USB limitations at that time nor compute the proper values. I just slaped it together based on examples. Anyway, together it was 20.4 µF (+ 10 µF after the coil). It never caused any problems when connected directly to a PC. But if connected to an USB hub then it caused problems. IIRC, connecting the device resulted in the hub reset occasionally (like 1 in 5 times??). Maybe the hub was not as good as it should have been too  ;D
Title: Re: The Living PCB Design Thread
Post by: Melvang on Thu, 29 October 2015, 10:21:52
Hey guys, I am attempting to learn KiCad for a full keyboard project of mine. 

I have been trying to follow this tutorial, along with that lib.  The problem is, the tutorial is outdated for the current version as it seems that a fair bit has changed in the GUI of KiCad.

Would anyone be willing to do an updated version some a simple 3x3 matrix or something similar.  This would preferably include a basic lib for keyboard components including MX footprints, stab cutouts for PCB mount stabs, Alps switches, and possibly MX/Alps switches.  Also, and update for how to import from GitHub to KiCad would be amazing.
Title: Re: The Living PCB Design Thread
Post by: profet on Thu, 29 October 2015, 12:18:28
So where are people getting their PCB's manufactured?

At what scale does it become cost effective?
Title: Re: The Living PCB Design Thread
Post by: hasu on Thu, 29 October 2015, 16:46:54
Use http://pcbshopper.com/, enter your pcb dimension and quantity you will find what you want.

EDIT: And this is my memo about what manufacturer community based projects used.
Quote
PCB Fab           
-------           
pcbway.com      XTant, Planck, xwhatsit, Alps64, HHKB Alt
    https://geekhack.org/index.php?topic=51767.msg1483719#msg1483719
        https://geekhack.org/index.php?topic=51767.msg1482989#msg1482989
    https://geekhack.org/index.php?topic=70092.msg1686984#msg1686984
    http://deskthority.net/workshop-f7/new-buckling-spring-design-t10234-60.html#p224987
    http://deskthority.net/workshop-f7/small-batch-pcbs-t10456.html#p224367
                   
pcbcart.com     GH60
    https://geekhack.org/index.php?topic=34959.msg703250#msg703250
                   
pcbwing.com     Ergodox, Zeta, Phantom                 
    https://geekhack.org/index.php?topic=48851.msg1394559#msg1394559
    https://geekhack.org/index.php?topic=71161.msg1721833#msg1721833
                   
seeedstudio.com keyboard.io                             
    https://geekhack.org/index.php?topic=52639.msg1169072#msg1169072
                   
oshpark.com     The Enabler                             
    https://geekhack.org/index.php?topic=57511.msg1331617#msg1331617
                   
elecrow.com     HHKB Alt, Alpst64 Rev.A                 
    https://geekhack.org/index.php?topic=12047.msg1293117#msg1293117
    https://geekhack.org/index.php?topic=69740.msg1702786#msg1702786
                   
dirtpcb.com     Regack, HHKB Alt, TMK USB-USB converter
    https://geekhack.org/index.php?topic=70566.0       
                   
itead             
                   
smart-prototyping.com

Title: Re: The Living PCB Design Thread
Post by: potatowire on Thu, 29 October 2015, 21:44:12
Hey guys, I am attempting to learn KiCad for a full keyboard project of mine. 

I have been trying to follow this tutorial, along with that lib.  The problem is, the tutorial is outdated for the current version as it seems that a fair bit has changed in the GUI of KiCad.

Would anyone be willing to do an updated version some a simple 3x3 matrix or something similar.  This would preferably include a basic lib for keyboard components including MX footprints, stab cutouts for PCB mount stabs, Alps switches, and possibly MX/Alps switches.  Also, and update for how to import from GitHub to KiCad would be amazing.

I like this tutorial:
Part 1 -
Part 2 -
Part 3 - upcoming

This Udemy course (free) is more exhaustive:
https://www.udemy.com/learn-kicad-printed-circuit-board-design/





Title: Re: The Living PCB Design Thread
Post by: Melvang on Thu, 29 October 2015, 23:14:41
Hey guys, I am attempting to learn KiCad for a full keyboard project of mine. 

I have been trying to follow this tutorial, along with that lib.  The problem is, the tutorial is outdated for the current version as it seems that a fair bit has changed in the GUI of KiCad.

Would anyone be willing to do an updated version some a simple 3x3 matrix or something similar.  This would preferably include a basic lib for keyboard components including MX footprints, stab cutouts for PCB mount stabs, Alps switches, and possibly MX/Alps switches.  Also, and update for how to import from GitHub to KiCad would be amazing.

I like this tutorial:
Part 1 -
Part 2 -
Part 3 - upcoming

This Udemy course (free) is more exhaustive:
https://www.udemy.com/learn-kicad-printed-circuit-board-design/

Thanks, will check them out.
Title: Re: The Living PCB Design Thread
Post by: Melvang on Wed, 18 November 2015, 23:38:43
Alright, I am making a lot of progress in this.  I do have a question regarding my project.

I am designing a set of PCBs that are similar to enablers, but are full row.  Where my question comes at is the diodes.  If I am designing the PCB to be flippable vertically to allow LEDs to be on top or bottom of the switch, when one flips the PCB, the orientation of the diode shouldn't change, correct?

I assume it functions as strobing the columns, and reading the rows?  At least if current flows from the column, into the switch, in the diode, and to the row.

At this point, does it make a difference if the connection between row and controller/row and controller at the top/bottom, or left/right side?
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Tue, 08 December 2015, 20:56:54
so i have KiCad, a CNC, and a burning desire to etch my own pcb in my workshop. any takers on a hand? i have the design done, plate CAD imported, everything looking good but when i go to start working on the traces i'm getting errors and can't seem to figure out what i'm doing wrong. any help would be smashing. attached is what ive been working on. i'm starting small but eventually i want to do a 60% TKL and full size keyboard PCB etched. all with Teensy controllers.

thanks in advance.
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Tue, 08 December 2015, 22:57:30
so i have KiCad, a CNC, and a burning desire to etch my own pcb in my workshop. any takers on a hand? i have the design done, plate CAD imported, everything looking good but when i go to start working on the traces i'm getting errors and can't seem to figure out what i'm doing wrong. any help would be smashing. attached is what ive been working on. i'm starting small but eventually i want to do a 60% TKL and full size keyboard PCB etched. all with Teensy controllers.

thanks in advance.

What kind of CNC are you talking about?

Assuming that you want to mill the traces, you'll have several challenges to overcome. You'll want to use a V-carve bit with a very tiny head, and you'll want to zero your machine very precisely. So precisely, in fact, that unless you have a vacuum table you'll have to setup a probe so that you can measure the topology of your PCB before starting. This way the mill can vary the height as needed to get a uniform depth.

You'll also need a machine with very little backlash and a spindle that can run at high speed (15k or faster) with very little runout. These things become less important if you're using a teensy for a controller, and more important if you want to use SMT components for your controller.

Once you have all that in place milling the board itself is pretty easy. There are plenty of programs that will turn gerbers into gcode so it's just a matter of mounting your board, zeroing in your CNC, and running the resulting g-code.
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Tue, 08 December 2015, 23:06:13
so i have KiCad, a CNC, and a burning desire to etch my own pcb in my workshop. any takers on a hand? i have the design done, plate CAD imported, everything looking good but when i go to start working on the traces i'm getting errors and can't seem to figure out what i'm doing wrong. any help would be smashing. attached is what ive been working on. i'm starting small but eventually i want to do a 60% TKL and full size keyboard PCB etched. all with Teensy controllers.

thanks in advance.

What kind of CNC are you talking about?

Assuming that you want to mill the traces, you'll have several challenges to overcome. You'll want to use a V-carve bit with a very tiny head, and you'll want to zero your machine very precisely. So precisely, in fact, that unless you have a vacuum table you'll have to setup a probe so that you can measure the topology of your PCB before starting. This way the mill can vary the height as needed to get a uniform depth.

You'll also need a machine with very little backlash and a spindle that can run at high speed (15k or faster) with very little runout. These things become less important if you're using a teensy for a controller, and more important if you want to use SMT components for your controller.

Once you have all that in place milling the board itself is pretty easy. There are plenty of programs that will turn gerbers into gcode so it's just a matter of mounting your board, zeroing in your CNC, and running the resulting g-code.
Currently I have a x-carve but I will be setting up probing. It's likely I won't do any pcb milling until I transfer to Linux CNC. So I have plenty of time to do had wired boards and get familiar with TMK etc. For now I plan on using a teensy. I'm also planning on doing some more mods on my xcarve to improve it. Stiffining mods etc. Also my spindle will do 30k. Makita 701c 

So getting familiar with kicad is my next step in the learning curve for this project.
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Wed, 09 December 2015, 01:03:26
Currently I have a x-carve but I will be setting up probing. It's likely I won't do any pcb milling until I transfer to Linux CNC. So I have plenty of time to do had wired boards and get familiar with TMK etc. For now I plan on using a teensy. I'm also planning on doing some more mods on my xcarve to improve it. Stiffining mods etc. Also my spindle will do 30k. Makita 701c 

So getting familiar with kicad is my next step in the learning curve for this project.

Sounds like you're getting a handle on it. Using a router for this purpose may or may not work for you, they have quite a bit of runout compared to spindles made for the task. It's fine as long as your traces are large enough, but that can make adding an SMT controller to the board more difficult.

What specific errors are you seeing? Without that info it's hard for anyone to help you.
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Wed, 09 December 2015, 06:04:38
Currently I have a x-carve but I will be setting up probing. It's likely I won't do any pcb milling until I transfer to Linux CNC. So I have plenty of time to do had wired boards and get familiar with TMK etc. For now I plan on using a teensy. I'm also planning on doing some more mods on my xcarve to improve it. Stiffining mods etc. Also my spindle will do 30k. Makita 701c 

So getting familiar with kicad is my next step in the learning curve for this project.

Sounds like you're getting a handle on it. Using a router for this purpose may or may not work for you, they have quite a bit of runout compared to spindles made for the task. It's fine as long as your traces are large enough, but that can make adding an SMT controller to the board more difficult.

What specific errors are you seeing? Without that info it's hard for anyone to help you.
Trace too close to pad
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 09 December 2015, 08:35:31
Then you probably drew a trace too close to a pad ;)

Have you made a schematic, generated a netlist, and assigned footprints to your components? If you haven't the PCB editor won't know which pads are supposed to be connected, and can only assume that each pad belongs to its own "net". That way you can't really connect anything without getting errors.
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Wed, 09 December 2015, 09:32:09
Then you probably drew a trace too close to a pad ;)

Have you made a schematic, generated a netlist, and assigned footprints to your components? If you haven't the PCB editor won't know which pads are supposed to be connected, and can only assume that each pad belongs to its own "net". That way you can't really connect anything without getting errors.

in the process of teaching myself KiCad so i'm sure i'm doing all the things wrong :3 but i'll look up netlist and see what comes from it! thanks:)
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 09 December 2015, 14:19:00
If you want to do things right you really need to start in eeschema, the schematics editor, and build your circuit there. That's from where you generate the netlist. If you just want to play around in pcbnew, where you draw the pcb, you can disable "Enforce design rules when routing" under Preferences->General. That lets you draw however you like. Which is perfectly fine for small stuff. When things start getting complicated the automatic checks are nice to have around. But that requires all previous steps to have been taken.

Basic workorder:
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Wed, 09 December 2015, 15:25:57
If you want to do things right you really need to start in eeschema, the schematics editor, and build your circuit there. That's from where you generate the netlist. If you just want to play around in pcbnew, where you draw the pcb, you can disable "Enforce design rules when routing" under Preferences->General. That lets you draw however you like. Which is perfectly fine for small stuff. When things start getting complicated the automatic checks are nice to have around. But that requires all previous steps to have been taken.

Basic workorder:
  • Pcb editor
    • Set up footprint libraries
    • draw/import pcb footprints
  • Schematics editor
    • Set up component libraries
    • draw/import schematic components
    • Place components
    • Hook them up
    • Assign footprints
    • Export netlist
  • Pcb editor
    • Read netlist
    • Place components
    • Route everything
  • Iterate, iterate, iterate

so i did the schematic but apparently my footprints and librarys aren't quite up to snuff. so i'll be doing some more research unless someone wants to PM me and see why i'm screwing up D:

LOL
Title: Re: The Living PCB Design Thread
Post by: qwack on Wed, 09 December 2015, 16:23:33
Just in case, have you tried the tutorials linked in the second message of the thread?
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Wed, 09 December 2015, 16:59:26
Just in case, have you tried the tutorials linked in the second message of the thread?
Let me check. I may have missed them. I looked over afew things. Likely it's more complete than that I've missed
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Wed, 09 December 2015, 18:33:37
my issue right now is the cherry mx switch sketches i have dont have footprints matched to them and i'm not seeing how to do that or a library with those already married.
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Wed, 09 December 2015, 21:27:27
my issue right now is the cherry mx switch sketches i have dont have footprints matched to them and i'm not seeing how to do that or a library with those already married.

I found some videos online and i'm making progress i think.  :thumb: :thumb:

tedious none the less -_-
Title: Re: The Living PCB Design Thread
Post by: iss on Sat, 12 December 2015, 12:11:16
Currently working on a small test design, and I just wanted to double check my atmega schematic:

(https://i.imgur.com/c7y2pBF.png)

Namely:

1) Is the connector correct? I couldn't find a 5-pin USB-mini part.
2) Is C3 in the right location?
3) What's the right way to add a secondary controller (for RGB LEDs, etc.)?

Thanks for the help.
Title: Re: The Living PCB Design Thread
Post by: qwack on Sat, 12 December 2015, 12:25:33
I don't think that C3 is in the right position, if you check the the Teensy 2.0 schematic you'll see that it should be between VCC and GND, not on the VCC line: https://www.pjrc.com/teensy/schematic.html

The USB connector sems to be correct.
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Sat, 12 December 2015, 12:37:09
things are starting to come together :3

[attach=1]
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Sat, 12 December 2015, 13:38:51
things are starting to come together :3

(Attachment Link)

design v2
Title: Re: The Living PCB Design Thread
Post by: joey on Sat, 12 December 2015, 13:53:51
Why.. is the teensy there?
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Sat, 12 December 2015, 14:05:14
Why.. is the teensy there?
Trying to figure out routing and it was easiest there for the moment. Just revision 2 tho. I tried near the space bar but had routing issues. I'm going to be engraving it with my cnc or am planning to so the traces are .5mm causing routing challenges
Title: Re: The Living PCB Design Thread
Post by: iss on Sat, 12 December 2015, 14:31:57
I don't think that C3 is in the right position, if you check the the Teensy 2.0 schematic you'll see that it should be between VCC and GND, not on the VCC line: https://www.pjrc.com/teensy/schematic.html

The USB connector sems to be correct.

(https://i.imgur.com/YnjN2yI.png)

Is that position better? Looks a lot like the GH60 schematic now. I also added in a 2x2 matrix for testing.

Still curious on how to add in an RGB LED controller (WS2812B or the like). (Or how to add LEDs in general- is it as simple as just routing power and adding a resistor?)
Title: Re: The Living PCB Design Thread
Post by: qwack on Sat, 12 December 2015, 15:21:52
Yes, that's more like it. You might want to do a bit of research about ICs and decoupling capacitors to understand why and how you should position caps connected to VCC, but as it is now it looks okay.

WS2812Bs have an IC inside each LED, so you just have to connect the data pin to an output pin on the atmega.

For traditional LEDs (without in-built controller) you'll generally want to use a constant current driver, which would be controlled by the atmega and to which you connect your LEDs (usually connected as some kind of matrix). If you have no idea what that means, search for "led constant current driver" on google, perhaps buy a few chips and a bunch of LEDs from adafruit or sparkfun, and take a look at existing solutions — for instance the Infinity keyboards made by the Input Club are open source, so you can look up their schematics and code to study how backlighting was implemented.

Remember that hardware is just one side of the problem, you need code to tell your LEDs how to behave. If you have no idea how you are going to implement that in code, perhaps it's too early to add LEDs to your PCB.
Title: Re: The Living PCB Design Thread
Post by: iss on Sat, 12 December 2015, 16:28:21
Yes, that's more like it. You might want to do a bit of research about ICs and decoupling capacitors to understand why and how you should position caps connected to VCC, but as it is now it looks okay.

WS2812Bs have an IC inside each LED, so you just have to connect the data pin to an output pin on the atmega.

For traditional LEDs (without in-built controller) you'll generally want to use a constant current driver, which would be controlled by the atmega and to which you connect your LEDs (usually connected as some kind of matrix). If you have no idea what that means, search for "led constant current driver" on google, perhaps buy a few chips and a bunch of LEDs from adafruit or sparkfun, and take a look at existing solutions — for instance the Infinity keyboards made by the Input Club are open source, so you can look up their schematics and code to study how backlighting was implemented.

Remember that hardware is just one side of the problem, you need code to tell your LEDs how to behave. If you have no idea how you are going to implement that in code, perhaps it's too early to add LEDs to your PCB.

Thanks for the tips- I'll read up and do my research.
Title: Re: The Living PCB Design Thread
Post by: qwack on Sat, 12 December 2015, 16:42:59
Also, be aware that you may have more questions after reading on these subjects :D But although copying existing designs is a great way to learn, you can only go so far without a fair understanding of what you're working with. So take advantage of all those tutorials you can find nowadays. Experimenting with a breadboard is tremendously helpful too.

(incidentally, I'm in the same place as you — I am able to design a simple PCB with switches and a controller, but I'm stuck on how to implement backlight in a way that is compatible with existing firmwares)
Title: Re: The Living PCB Design Thread
Post by: jdcarpe on Sat, 12 December 2015, 19:26:03
things are starting to come together :3

(Attachment Link)

design v2
Great job so far on the PCB! Do you plan on doing one for each of the different sizes of keyboard you are building in those wooden cases?

I know it's a good exercise to start with the smallest PCB and work your way up, but if you want to cheat and use an existing JD40 PCB, I can send you one. :)
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Sat, 12 December 2015, 19:32:04
things are starting to come together :3

(Attachment Link)

design v2
Great job so far on the PCB! Do you plan on doing one for each of the different sizes of keyboard you are building in those wooden cases?

I know it's a good exercise to start with the smallest PCB and work your way up, but if you want to cheat and use an existing JD40 PCB, I can send you one. :)
Wow that would be awesome even if to just learn from someone way more expierenced than me. I would be honored if you wouldn't mind sending me your design.

As for the rest I'd love to replace the hand wiring with a pcb but the big 108key will be hard to source a board for. Well a blank copper clad plate. I want to etch the boards with my cnc. I'm one who loves a challenge and to jump in with both feet ;)
Title: Re: The Living PCB Design Thread
Post by: twiddle on Sat, 12 December 2015, 23:09:24
Can I get a bit of a sanity check? The PCB I'm working on at the moment is my first attempt to support both ANSI/ISO at the same time.
I'm connecting the alternate switches up like so:
(http://i.imgur.com/3VwUZLv.png)
(http://i.imgur.com/ZdFH0rP.png)

Is this the way it's usually done? I don't have a decent multi-layout PCB design on hand for reference.
Still gotta work out where in the matrix I'm going to add the extra key that comes with a split backspace , but aside from these couple of things I'm just about done with the switches and can move onto the rest of the board, so any other general comments or pointing out of stupid things I've missed would be appreciated.

(http://i.imgur.com/Gp3KIRv.png)
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Sat, 12 December 2015, 23:21:22
Can I get a bit of a sanity check? The PCB I'm working on at the moment is my first attempt to support both ANSI/ISO at the same time.
I'm connecting the alternate switches up like so:
Show Image
(http://i.imgur.com/3VwUZLv.png)

Show Image
(http://i.imgur.com/ZdFH0rP.png)


Is this the way it's usually done? I don't have a decent multi-layout PCB design on hand for reference.
Still gotta work out where in the matrix I'm going to add the extra key that comes with a split backspace , but aside from these couple of things I'm just about done with the switches and can move onto the rest of the board, so any other general comments or pointing out of stupid things I've missed would be appreciated.

Show Image
(http://i.imgur.com/Gp3KIRv.png)


I have seen the ISO enter in both orientations. On the fc660m and GON's PCB, for example, it's rotated like vertical keys would be. On WKL's boards it is oriented in the same way yours is. I haven't found a good reason to choose one orientation over the other.

Is there a reason you have the trace from ANSI enter's column to ISO enter's column running parallel to a trace on the same net? Normally I would have it join the column immediately and have only a single trace run vertically from that point.
Title: Re: The Living PCB Design Thread
Post by: twiddle on Sun, 13 December 2015, 03:18:47
Is there a reason you have the trace from ANSI enter's column to ISO enter's column running parallel to a trace on the same net? Normally I would have it join the column immediately and have only a single trace run vertically from that point.
I'm not altogether sure what you're meaning by 'join the column immediately' - If you look at the other picture, showing the left shift, the way I handled it there was to simply run the column through the standard key, then connect the corresponding pins of the variant switches in series with each other. It's a T junction of sorts, with the column being the cross bar and the variant keys arranged along the line that is perpendicular to it, if that makes sense.
I've done the same with the return key, but given the hole in the PCB for the centre of the ISORETN switch I had to route the trace around it rather than it simply flowing to the right like on the shift image.
Are you suggesting that I do away with the trace between ISORETN and UP, and simply route ISORETN->RETN->UP like the following?

(http://i.imgur.com/h2q7857.png)
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Sun, 13 December 2015, 05:39:36
Is there a reason you have the trace from ANSI enter's column to ISO enter's column running parallel to a trace on the same net? Normally I would have it join the column immediately and have only a single trace run vertically from that point.
I'm not altogether sure what you're meaning by 'join the column immediately' - If you look at the other picture, showing the left shift, the way I handled it there was to simply run the column through the standard key, then connect the corresponding pins of the variant switches in series with each other. It's a T junction of sorts, with the column being the cross bar and the variant keys arranged along the line that is perpendicular to it, if that makes sense.
I've done the same with the return key, but given the hole in the PCB for the centre of the ISORETN switch I had to route the trace around it rather than it simply flowing to the right like on the shift image.
Are you suggesting that I do away with the trace between ISORETN and UP, and simply route ISORETN->RETN->UP like the following?

Show Image
(http://i.imgur.com/h2q7857.png)


What you've done is one possible solution, although not exactly what I was suggesting. I was suggesting you join the two traces into one at the location I'm pointing to here, rather than have 2 traces for the same net running parallel to one another.

(http://i.imgur.com/nhvl3uV.png)

Any of the 3 configurations will work just fine for this application, but the second two are cleaner looking than your initial attempt.
Title: Re: The Living PCB Design Thread
Post by: martin525622 on Sun, 13 December 2015, 06:20:43
Hello i would need help with designing a onboard 32u4 controller but the hard side my project should be single sidet  so there come some hickups
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sun, 13 December 2015, 11:51:41
How thin are those traces anyway. They look very thin to me. The board manufacturer would probably question your sanity over that hole overlapping the pad like that. But if that is what you want you may be able to talk them into doing it for you =)
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sun, 13 December 2015, 11:53:25
Hello i would need help with designing a onboard 32u4 controller but the hard side my project should be single sidet  so there come some hickups

Are you etching yourself? Double sided boards aren't much more expensive otherwise, are they? You'll just need to add some jumpers to get signals to where you need them. Drawing a matrix on a single sided board doesn't usually come very easy either...
Title: Re: The Living PCB Design Thread
Post by: martin525622 on Sun, 13 December 2015, 13:09:14
My teacher in electronics class is making my pcbs :) he is ok with that so no problemo i could push a onboard controller  in like 2 dqts got q lot if learning :D
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Sun, 13 December 2015, 13:35:48
How thin are those traces anyway. They look very thin to me. The board manufacturer would probably question your sanity over that hole overlapping the pad like that. But if that is what you want you may be able to talk them into doing it for you =)

My fabricator may question my sanity, but if they do they've never said anything to me about it. ;) This is the swiss cheese you'll find on the clueboard in that area:

(http://i.imgur.com/UFpD0NI.png)

As you can see one of the mount pins for ISO enter is completely within the alps pad for backslash. I've had that configuration on boards from several fab houses and all of them made the board without complaint. And yes, the backslash switch works great even with that chunk missing.
Title: Re: The Living PCB Design Thread
Post by: twiddle on Sun, 13 December 2015, 14:48:52
How thin are those traces anyway. They look very thin to me. The board manufacturer would probably question your sanity over that hole overlapping the pad like that. But if that is what you want you may be able to talk them into doing it for you =)
Pretty sure some of the SPRiT boards have holes and pads overlapping like that.
As far as the traces go, they are 6mil trace/space. I use the following diagram from my fab (Smart-Prototyping):
(http://smart-prototyping.com/image/data/1_services/1_electrical/100201_PCB_Definition.jpg)

They work fine on all the prototypes I've done so far.

As far as supporting the split spacebar goes, I'm thinking of simply placing the extra key at the top of one of the columns above the spacebar that only have 4 keys. Any other suggestions people have?
Title: Re: The Living PCB Design Thread
Post by: qwack on Sun, 13 December 2015, 14:57:53
A lot of PCBs that allows several bottom row configurations feature overlapping pads and drilled pads, e.g. the GH60 or the Whitefox, so some fabs can definitely do that, but some explicitely warn against it (itead for instance).

As for trace width/spacing, it's usually better (read: safer) to go with wider traces — there is no need to stick to the fab's absolute minima if your pcb can accomodate wider traces.
Title: Re: The Living PCB Design Thread
Post by: twiddle on Sun, 13 December 2015, 15:07:09
As for trace width/spacing, it's usually better (read: safer) to go with wider traces — there is no need to stick to the fab's absolute minima if your pcb can accomodate wider traces.

Agreed. I used to have them wider, but then got lazy and just leave them at 6, and change the power traces to be thicker.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 14 December 2015, 06:59:58
If you can't do it with 30 mil you are doing it wrong ;-) And I know all about overlapping... Gave up on PCB mount rubbish long ago =P

[attachimg=1]
Title: Re: The Living PCB Design Thread
Post by: qwack on Mon, 14 December 2015, 07:47:27
Can you fit a LED matrix with 30 mil traces as well? ;D
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Mon, 14 December 2015, 07:51:44
is there a good way to place switch footprints to a DXF plate of a keyboard in KiCad? i'm ding it by hand at the moment and boy is that painful. i as to ensure precise placement of the switches. and for time's sake.
Title: Re: The Living PCB Design Thread
Post by: joey on Mon, 14 December 2015, 07:56:10
If you can't do it with 30 mil you are doing it wrong ;-) And I know all about overlapping... Gave up on PCB mount rubbish long ago =P

(Attachment Link)
Wow, that's a lot of switches next to each other!
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 14 December 2015, 08:02:16
is there a good way to place switch footprints to a DXF plate of a keyboard in KiCad? i'm ding it by hand at the moment and boy is that painful. i as to ensure precise placement of the switches. and for time's sake.

I usually set the grid to 0.75" divided by 8 or 16, that is 0.09375" or 0.046875". Then you can use 's' to snap the grid origin to wherever you want. Activate the trace tool and hover over the central pad for a switch. The tool will "magnetically" snap to that pad. Hit 's' and set the origin there. Then you can use the 0.09375" grid to place components correctly.

Or you script it some way... The KiCAD file formats are quite scriptable.
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Mon, 14 December 2015, 08:04:41
is there a good way to place switch footprints to a DXF plate of a keyboard in KiCad? i'm ding it by hand at the moment and boy is that painful. i as to ensure precise placement of the switches. and for time's sake.

I usually set the grid to 0.75" divided by 8 or 16, that is 0.09375" or 0.046875". Then you can use 's' to snap the grid origin to wherever you want. Activate the trace tool and hover over the central pad for a switch. The tool will "magnetically" snap to that pad. Hit 's' and set the origin there. Then you can use the 0.09375" grid to place components correctly.

Or you script it some way... The KiCAD file formats are quite scriptable.

thanks i'll give that a try. doing it by hand is painful. it works but one of my upcoming projects is a 108 key. and doing that by hand would make me want to chop off my fingers and give up on keyboards LOL
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 14 December 2015, 08:06:13
If you can't do it with 30 mil you are doing it wrong ;-) And I know all about overlapping... Gave up on PCB mount rubbish long ago =P

(Attachment Link)
Wow, that's a lot of switches next to each other!

Yeah =) And pcbwing didn't even say anything about it this time around. It should be delivered any day now, and we'll see how messed up it gets... Poetically the board ended up on exactly 1001 drill holes =D
Title: Re: The Living PCB Design Thread
Post by: joey on Mon, 14 December 2015, 08:09:18
Care to show us what its going to be? :)
Title: Re: The Living PCB Design Thread
Post by: twiddle on Mon, 14 December 2015, 11:45:12
If you can't do it with 30 mil you are doing it wrong ;-) And I know all about overlapping... Gave up on PCB mount rubbish long ago =P
For the matrix, sure.. but no MCU I've ever routed could have 30 mil traces connected to adjacent pins, the pitch is way too small, and the amount of necking needed to make it work would defeat the purpose. It's only going to get worse, too, some ICs I've been using on non-keyboard projects are now only available in 3mm x3mm LGA  :eek:
Like I said, I usually just get lazy and only set up two net classes, power and signal.
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Mon, 14 December 2015, 13:06:34
is there a good way to place switch footprints to a DXF plate of a keyboard in KiCad? i'm ding it by hand at the moment and boy is that painful. i as to ensure precise placement of the switches. and for time's sake.

I usually set the grid to 0.75" divided by 8 or 16, that is 0.09375" or 0.046875". Then you can use 's' to snap the grid origin to wherever you want. Activate the trace tool and hover over the central pad for a switch. The tool will "magnetically" snap to that pad. Hit 's' and set the origin there. Then you can use the 0.09375" grid to place components correctly.

Or you script it some way... The KiCAD file formats are quite scriptable.

thanks i'll give that a try. doing it by hand is painful. it works but one of my upcoming projects is a 108 key. and doing that by hand would make me want to chop off my fingers and give up on keyboards LOL

That's the entire reason I wrote a tool (http://kalerator.clueboard.co/) to lay those out for me in EAGLE. Doesn't help those of you using KiCAD, but maybe someday someone will write a similar tool for that.
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Mon, 14 December 2015, 13:18:49
is there a good way to place switch footprints to a DXF plate of a keyboard in KiCad? i'm ding it by hand at the moment and boy is that painful. i as to ensure precise placement of the switches. and for time's sake.

I usually set the grid to 0.75" divided by 8 or 16, that is 0.09375" or 0.046875". Then you can use 's' to snap the grid origin to wherever you want. Activate the trace tool and hover over the central pad for a switch. The tool will "magnetically" snap to that pad. Hit 's' and set the origin there. Then you can use the 0.09375" grid to place components correctly.

Or you script it some way... The KiCAD file formats are quite scriptable.

thanks i'll give that a try. doing it by hand is painful. it works but one of my upcoming projects is a 108 key. and doing that by hand would make me want to chop off my fingers and give up on keyboards LOL

That's the entire reason I wrote a tool (http://kalerator.clueboard.co/) to lay those out for me in EAGLE. Doesn't help those of you using KiCAD, but maybe someday someone will write a similar tool for that.

Thats pretty BA my friend. i can't wait to get my engraving bits and copper clad plate in and start me some milling ;)
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 14 December 2015, 15:20:27
I actually sort of scripted my last design. I made a matrix with all "nodes" populated in the schematic. Then I made a single footprint with twice the number of pads in relation to switches. So column 0, row A, in the matrix is labeled with pads 0 and 2, column 1, row A with pads 2 and 3, and so on. If a switch has multiple possible locations, the pad numbers are just re-used. That works fine in KiCad at least. I then calculate where all pads go. That way I didn't need to place ~200 switch footprints, and it's also not possible to accidentally move them around.

A hundred switches or so really aren't that bad to place by hand. Routing them up is much more time consuming anyway. At least to me...
Title: Re: The Living PCB Design Thread
Post by: joey on Mon, 14 December 2015, 15:24:49
I didn't quite get your last explanation..
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Mon, 14 December 2015, 15:25:26
I actually sort of scripted my last design. I made a matrix with all "nodes" populated in the schematic. Then I made a single footprint with twice the number of pads in relation to switches. So column 0, row A, in the matrix is labeled with pads 0 and 2, column 1, row A with pads 2 and 3, and so on. If a switch has multiple possible locations, the pad numbers are just re-used. That works fine in KiCad at least. I then calculate where all pads go. That way I didn't need to place ~200 switch footprints, and it's also not possible to accidentally move them around.

A hundred switches or so really aren't that bad to place by hand. Routing them up is much more time consuming anyway. At least to me...
Alright I'll send you my footprint then lol
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Tue, 15 December 2015, 01:51:02
I didn't quite get your last explanation..

In short, the whole keyboard is a single monster footprint with almost 400 pads. It's much harder to accidentally move anything around, and it seemed easier to script on the footprint than meddling with the board file. This of course requires the schematic to consist of a single corresponding monster component with a similar number of pads, well actually 24x8x2=384. There are of course a lot of gaps in that matrix, and there is a many to one relation between footprint pads and component pins. And a lot of unused diodes. I kept them separated from the switch matrix since I wanted to be able to move them around by hand. So I probably placed 200 switch footprints by script, and 110 or so diodes by hand before/while routing.
Title: Re: The Living PCB Design Thread
Post by: iss on Fri, 18 December 2015, 14:58:35
I've got a couple questions on using a secondary IC. I'm planning on using an atmega32u4 to drive my matrix and then adding an atmega328p to drive some WS2812Bs. Is it possible to program both chips without external tools? Here's what I was planning:

With MOSI, MISO, SCK, reset, power/ground, and RX/TX pins connected between the two,

1) Use the DFU bootloader on the 32u4 to upload code turning it into an AVR ISP.
2) With the above, burn a bootloader onto the 328p, then upload LED control code.
3) Upload TMK/etc to the 32u4.
Title: Re: The Living PCB Design Thread
Post by: iss on Sun, 20 December 2015, 15:42:23
.
Title: Re: The Living PCB Design Thread
Post by: VinnyCordeiro on Sun, 20 December 2015, 18:23:08
I've got a couple questions on using a secondary IC. I'm planning on using an atmega32u4 to drive my matrix and then adding an atmega328p to drive some WS2812Bs. Is it possible to program both chips without external tools? Here's what I was planning:

With MOSI, MISO, SCK, reset, power/ground, and RX/TX pins connected between the two,

1) Use the DFU bootloader on the 32u4 to upload code turning it into an AVR ISP.
2) With the above, burn a bootloader onto the 328p, then upload LED control code.
3) Upload TMK/etc to the 32u4.
Why complicate something simple? You can use a LED driver for that. The IS31FL3731 IC is used by Ergodox Infinity and can be controlled through I2C. Example: http://imgur.com/a/FbJg9 (http://imgur.com/a/FbJg9) (the guy didn't released his code, though. :( )
Title: Re: The Living PCB Design Thread
Post by: iss on Sun, 20 December 2015, 18:59:06
Why complicate something simple? You can use a LED driver for that. The IS31FL3731 IC is used by Ergodox Infinity and can be controlled through I2C. Example: http://imgur.com/a/FbJg9 (http://imgur.com/a/FbJg9) (the guy didn't released his code, though. :( )

Correct me if I'm wrong, but the IS3FL3731 can only drive typical LEDs, right? Only RGB LEDs literally composed of three LEDs (like the 5060BRG4 he used) would work, and that'd require 60*3=180 LEDs, too many for the IC.
Title: Re: The Living PCB Design Thread
Post by: VinnyCordeiro on Sun, 20 December 2015, 19:32:23
Why complicate something simple? You can use a LED driver for that. The IS31FL3731 IC is used by Ergodox Infinity and can be controlled through I2C. Example: http://imgur.com/a/FbJg9 (http://imgur.com/a/FbJg9) (the guy didn't released his code, though. :( )

Correct me if I'm wrong, but the IS3FL3731 can only drive typical LEDs, right? Only RGB LEDs literally composed of three LEDs (like the 5060BRG4 he used) would work, and that'd require 60*3=180 LEDs, too many for the IC.
This IC can handle up to 144 individual LEDs or 32 RGB LEDs + 48 not-red LEDs. You would need 2 of them to light all the keys of a typical 60% keyboard with RGB LEDs.
Title: Re: The Living PCB Design Thread
Post by: iss on Sun, 20 December 2015, 20:34:30
Hmm, didn't know that- thanks for the help. How should the matrix be wired? Do the differing voltage drops make a difference for constant current drivers?
Title: Re: The Living PCB Design Thread
Post by: VinnyCordeiro on Sun, 20 December 2015, 20:45:07
Hmm, didn't know that- thanks for the help. How should the matrix be wired? Do the differing voltage drops make a difference for constant current drivers?
You'll need to look the datasheet for that: http://www.issi.com/WW/pdf/31FL3731.pdf (http://www.issi.com/WW/pdf/31FL3731.pdf)
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Tue, 22 December 2015, 10:24:26
anyone have any sources for really big 2 sided copper clad plates for pcb etching/engraving ??? i'm talking 18inx6in

i need materials so i can start prototyping PCB's and finding the big boys is somewhat of a challenge.

thanks!

Edit: i found a company in the US (MN ) that i'll likely be ordering from since they have MASSIVE sheets of the stuff.  link below to help anyone looking.

http://www.digikey.com/classic/Ordering/AddPart.aspx (http://www.digikey.com/classic/Ordering/AddPart.aspx)
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 23 December 2015, 09:29:57
Care to show us what its going to be? :)

Actually, Santa came early =)

A full size board, that is expected to fit a number of Costar cases, both full size and TKL. It supports a range of different regular layouts as well as a bunch of symmetric ones. The matrix is 6 rows by 22 columns.
[attach=1]

It will be controlled by this daughter board. It's a Frosty Flake on steroids. It should work as a Flake as well (with some of the pins clipped). A Frosty Flake should also be able to control just the TKL parts of the Sane Matrix.
[attach=2]

I haven't had time to test anything yet...
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Wed, 23 December 2015, 09:31:16
Care to show us what its going to be? :)

Actually, Santa came early =)

A full size board, that is expected to fit a number of Costar cases, both full size and TKL. It supports a range of different regular layouts as well as a bunch of symmetric ones.
(Attachment Link)

It will be controlled by this daughter board.
(Attachment Link)

I haven't had time to test anything yet...

thats glorious. i'm working up towards something like that!
very awesome
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Tue, 05 January 2016, 08:32:43
anyone familiar with FlatCAM especially work flow from KiCAD to FlatCAM? i have it working mostly. just trying to get a better understanding to ensure my cuts are highly accurate.
Title: Re: The Living PCB Design Thread
Post by: qwack on Tue, 09 February 2016, 16:44:34
I'd like to implement a Teensy on my board but I am not sure how to handle the USB port. The simplest way would be to do it like on the Ergodox:

[attachimg=1]

But I read that USB data lines have to be routed as a differential pair (http://www.appfruits.com/2015/03/building-your-own-custom-teensy/), so I am not sure whether wiring it like this would be a safe choice or not. Should I expect problems with this way or wiring the USB port?
Title: Re: The Living PCB Design Thread
Post by: joey on Tue, 09 February 2016, 17:07:22
I'd like to implement a Teensy on my board but I am not sure how to handle the USB port. The simplest way would be to do it like on the Ergodox:

(Attachment Link)

But I read that USB data lines have to be routed as a differential pair (http://www.appfruits.com/2015/03/building-your-own-custom-teensy/), so I am not sure whether wiring it like this would be a safe choice or not. Should I expect problems with this way or wiring the USB port?
Well... It works for the ergodox!
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Tue, 09 February 2016, 17:09:02
Jd40 smallfry has a similar USB header hop
Title: Re: The Living PCB Design Thread
Post by: qwack on Wed, 10 February 2016, 06:33:26
Well... It works for the ergodox!

I was wondering if there had been any reports of problems with the Ergodox's USB connection, but a quick search didn't return anything. So I guess it's good enough indeed!

Jd40 smallfry has a similar USB header hop

True, and other prototype boards as well. If the cable is cut and soldered properly, maybe it's not that different from the internal USB cable on many keyboards (here (http://i16.photobucket.com/albums/b16/xBfish/Web%20Content%20Pictures/2_zps01b28eea.jpg) for instance).
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Wed, 10 February 2016, 07:11:50
More
Well... It works for the ergodox!

I was wondering if there had been any reports of problems with the Ergodox's USB connection, but a quick search didn't return anything. So I guess it's good enough indeed!

Jd40 smallfry has a similar USB header hop

True, and other prototype boards as well. If the cable is cut and soldered properly, maybe it's not that different from the internal USB cable on many keyboards (here (http://i16.photobucket.com/albums/b16/xBfish/Web%20Content%20Pictures/2_zps01b28eea.jpg) for instance).

it boils down to how much space you need under the PCB from an engineering standpoint. if you have a cavernous amount of space then it doesn't really matter. if your trying to get the thinnest thing possible then that extra 5-6mm the teensy and USB male header takes up becomes an annoyance. i'm dealing with that in a project now for my "build to give back" its not a HUGE deal as my material is thick enough to take the extra pocket i have to cut into account. dont get me wrong the JD40 smallfry PCB is really excellent. i'm only now starting PCB design. daughter boards such as the teensy are handy as it makes PCB creation and assembly easy. but long term a built in ATMega or similar controller would be great. i use the JD40 as an example as ive been studying it as i assemble my build. its always nice to have something in hand to look at.
back to your comment. the teensy seems to have some pad headers underneath it that could possibly be directly soldered onto the PCB eliminating the female USB plug. but its underneath the teensy so soldering it would require a heat gun or a solder re-flow station. also if it was me i'm not sure i'd like that solution as i couldn't be 100% sure i had the pads soldered correctly as it would be covered. making troubleshooting a nightmare.

food for thought.
Title: Re: The Living PCB Design Thread
Post by: qwack on Wed, 10 February 2016, 07:45:30
Yeah, I'm still debating whether to use a Teensy or implement the atmega chip on the pcb. I'll be making a very thin case (the project is here (https://deskthority.net/workshop-f7/the-slab-65-keyboard-with-wood-case-t12512.html)) but the keyboard will sit at a 7° angle so there will be room for the bulky Teensy+USB cable. The onboard chip would be more elegant and less costly should I build several of them, but I already have a few Teensies on hand and this is my first keyboard PCB so I'd rather go one step at a time.

I don't think the Teensy 2.0 has pads on the bottom of the board for the USB lines, only the 3.x and LC have them (unless I'm mistaken). And as you stated, it might not be the safest choice.

Also, I just saw that Teensies always communicate at Full Speed (12 Mbit/s), so trace impedance and such are no issue in this case. So I'll do it the Ergodox way this time. Thanks for all the answers guys!
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Wed, 10 February 2016, 07:47:51
Yeah, I'm still debating whether to use a Teensy or implement the atmega chip on the pcb. I'll be making a very thin case (the project is here (https://deskthority.net/workshop-f7/the-slab-65-keyboard-with-wood-case-t12512.html)) but the keyboard will sit at a 7° angle so there will be room for the bulky Teensy+USB cable. The onboard chip would be more elegant and less costly should I build several of them, but I already have a few Teensies on hand and this is my first keyboard PCB so I'd rather go one step at a time.

I don't think the Teensy 2.0 has pads on the bottom of the board for the USB lines, only the 3.x and LC have them (unless I'm mistaken). And as you stated, it might not be the safest choice.

Also, I just saw that Teensies always communicate at Full Speed (12 Mbit/s), so trace impedance and such are no issue in this case. So I'll do it the Ergodox way this time. Thanks for all the answers guys!

love wood cases. ive been making afew myself. ;)
Title: Re: The Living PCB Design Thread
Post by: regack on Wed, 10 February 2016, 11:57:03
it boils down to how much space you need under the PCB from an engineering standpoint. if you have a cavernous amount of space then it doesn't really matter. if your trying to get the thinnest thing possible then that extra 5-6mm the teensy and USB male header takes up becomes an annoyance. i'm dealing with that in a project now for my "build to give back" its not a HUGE deal as my material is thick enough to take the extra pocket i have to cut into account. dont get me wrong the JD40 smallfry PCB is really excellent. i'm only now starting PCB design. daughter boards such as the teensy are handy as it makes PCB creation and assembly easy. but long term a built in ATMega or similar controller would be great. i use the JD40 as an example as ive been studying it as i assemble my build. its always nice to have something in hand to look at.
back to your comment. the teensy seems to have some pad headers underneath it that could possibly be directly soldered onto the PCB eliminating the female USB plug. but its underneath the teensy so soldering it would require a heat gun or a solder re-flow station. also if it was me i'm not sure i'd like that solution as i couldn't be 100% sure i had the pads soldered correctly as it would be covered. making troubleshooting a nightmare.

food for thought.

I don't believe the pads on the bottom break out the USB data lines.  The Teensy would really be made better for general keyboard use if the USB D+/D- were broken out into pins, eliminating the need for the need for that USB jumper.   I suppose you could remove the USB connector and try to solder directly to the 5 little pads at the base of it but that would be pretty fiddly.

At one point I made this thing:
(http://i.imgur.com/4pqEZwkm.jpg)
...which is an ATMEGA32U4 + MCP23018 with that .5 pitch low-profile interconnect.  I made a breakout board for it which provided every single ATMEGA IO line, but in the end (even though it worked) I just abandoned it in favor of building everything on the PCB itself. 

Twiddle, both here on Geekhack (https://geekhack.org/index.php?topic=62667.msg2039178#msg2039178) and over on DT (https://deskthority.net/workshop-f7/alternative-controller-experiments-t8735-150.html) has some nice alternate controller ideas for the future going. 

It really wouldn't take very long to design a quick replacement for the Teensy that could be a lot better for daughterboard cases like the JD40 or original ErgoDox - the problem is who would front the cost of the first production run - and who is going to continue to have them made and hold stock? 

Sorry, I got kind of distracted and started rambling.
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Wed, 10 February 2016, 12:17:27
it boils down to how much space you need under the PCB from an engineering standpoint. if you have a cavernous amount of space then it doesn't really matter. if your trying to get the thinnest thing possible then that extra 5-6mm the teensy and USB male header takes up becomes an annoyance. i'm dealing with that in a project now for my "build to give back" its not a HUGE deal as my material is thick enough to take the extra pocket i have to cut into account. dont get me wrong the JD40 smallfry PCB is really excellent. i'm only now starting PCB design. daughter boards such as the teensy are handy as it makes PCB creation and assembly easy. but long term a built in ATMega or similar controller would be great. i use the JD40 as an example as ive been studying it as i assemble my build. its always nice to have something in hand to look at.
back to your comment. the teensy seems to have some pad headers underneath it that could possibly be directly soldered onto the PCB eliminating the female USB plug. but its underneath the teensy so soldering it would require a heat gun or a solder re-flow station. also if it was me i'm not sure i'd like that solution as i couldn't be 100% sure i had the pads soldered correctly as it would be covered. making troubleshooting a nightmare.

food for thought.

I don't believe the pads on the bottom break out the USB data lines.  The Teensy would really be made better for general keyboard use if the USB D+/D- were broken out into pins, eliminating the need for the need for that USB jumper.   I suppose you could remove the USB connector and try to solder directly to the 5 little pads at the base of it but that would be pretty fiddly.

At one point I made this thing:
Show Image
(http://i.imgur.com/4pqEZwkm.jpg)

...which is an ATMEGA32U4 + MCP23018 with that .5 pitch low-profile interconnect.  I made a breakout board for it which provided every single ATMEGA IO line, but in the end (even though it worked) I just abandoned it in favor of building everything on the PCB itself. 

Twiddle, both here on Geekhack (https://geekhack.org/index.php?topic=62667.msg2039178#msg2039178) and over on DT (https://deskthority.net/workshop-f7/alternative-controller-experiments-t8735-150.html) has some nice alternate controller ideas for the future going. 

It really wouldn't take very long to design a quick replacement for the Teensy that could be a lot better for daughterboard cases like the JD40 or original ErgoDox - the problem is who would front the cost of the first production run - and who is going to continue to have them made and hold stock? 

Sorry, I got kind of distracted and started rambling.

thats awesome!
Title: Re: The Living PCB Design Thread
Post by: MOZ on Wed, 10 February 2016, 12:40:56
it boils down to how much space you need under the PCB from an engineering standpoint. if you have a cavernous amount of space then it doesn't really matter. if your trying to get the thinnest thing possible then that extra 5-6mm the teensy and USB male header takes up becomes an annoyance. i'm dealing with that in a project now for my "build to give back" its not a HUGE deal as my material is thick enough to take the extra pocket i have to cut into account. dont get me wrong the JD40 smallfry PCB is really excellent. i'm only now starting PCB design. daughter boards such as the teensy are handy as it makes PCB creation and assembly easy. but long term a built in ATMega or similar controller would be great. i use the JD40 as an example as ive been studying it as i assemble my build. its always nice to have something in hand to look at.
back to your comment. the teensy seems to have some pad headers underneath it that could possibly be directly soldered onto the PCB eliminating the female USB plug. but its underneath the teensy so soldering it would require a heat gun or a solder re-flow station. also if it was me i'm not sure i'd like that solution as i couldn't be 100% sure i had the pads soldered correctly as it would be covered. making troubleshooting a nightmare.

food for thought.

I don't believe the pads on the bottom break out the USB data lines.  The Teensy would really be made better for general keyboard use if the USB D+/D- were broken out into pins, eliminating the need for the need for that USB jumper.   I suppose you could remove the USB connector and try to solder directly to the 5 little pads at the base of it but that would be pretty fiddly.

At one point I made this thing:
Show Image
(http://i.imgur.com/4pqEZwkm.jpg)

...which is an ATMEGA32U4 + MCP23018 with that .5 pitch low-profile interconnect.  I made a breakout board for it which provided every single ATMEGA IO line, but in the end (even though it worked) I just abandoned it in favor of building everything on the PCB itself. 

Twiddle, both here on Geekhack (https://geekhack.org/index.php?topic=62667.msg2039178#msg2039178) and over on DT (https://deskthority.net/workshop-f7/alternative-controller-experiments-t8735-150.html) has some nice alternate controller ideas for the future going. 

It really wouldn't take very long to design a quick replacement for the Teensy that could be a lot better for daughterboard cases like the JD40 or original ErgoDox - the problem is who would front the cost of the first production run - and who is going to continue to have them made and hold stock? 

Sorry, I got kind of distracted and started rambling.

I still need to build mine, :(
Title: Re: The Living PCB Design Thread
Post by: qwack on Wed, 10 February 2016, 12:41:11
The idea of a custom daughterboard holding an atmega with all pins broken out was actually my third option but I ruled it out for the same reason as you — if I have to hand-solder TQFPs I might as well do it directly on the board.

My idea was something like this, with all pins on one row and the USB at a proper angle so that you just have to connect the matrix to the daughterboard, which would sit under the top key row:

(http://reho.st/self/c15d87c5a39cc8a1ec937580582c6ea4ca1d995a.png)

Your super low profile atmega board is awesome though! Harder to make for the average DIYer, but the execution is great.
Title: Re: The Living PCB Design Thread
Post by: sinusoid on Mon, 22 February 2016, 13:29:58
Does anyone know if/how KiCad/pcbnew supports curved tracks (or curved track corners at least)? Searched, but only saw this on several wishlists, and saw it being discussed about a year ago...

Do I have to stick to 45degs? (or approximate curves manually?) Could I use the circular drawing tool somehow to add these?
Title: Re: The Living PCB Design Thread
Post by: joey on Mon, 22 February 2016, 13:34:26
Does anyone know if/how KiCad/pcbnew supports curved tracks (or curved track corners at least)? Searched, but only saw this on several wishlists, and saw it being discussed about a year ago...

Do I have to stick to 45degs? (or approximate curves manually?) Could I use the circular drawing tool somehow to add these?
It supports.. some kinda curves. The Infinity PCBs use them. However the traces were done by an autorouter, so while the file format might support it, I don't think the KiCAD UI does.

You can probably set the angle much lower, and just estimate a curve or look at generating the .kicad_pcb format manually.
Title: Re: The Living PCB Design Thread
Post by: MOZ on Tue, 23 February 2016, 01:19:54
You can override the 45deg rule in the options, if you want more acute or obtuse angle. KiCAD by itself doesn't allow you to make curved traces. The only curved traces you'll see in KiCAD are either from meandering or if you use an external autorouter/routing tool  to route the tracks. In both these cases the curves consist of several small straight traces.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Tue, 23 February 2016, 12:26:04
I was contemplating over doing curved traces in KiCAD. My idea was to make components that consist of two pads (with the same number perhaps). Then add a bunch of those components to each net that will have curves. Then make a bunch of footprints with different radii and angles that have two pads in the endpoints and a circle segment to tie them together. KiCAD will think all is dandy since it sees everything as tied together through the pads.

In the end that whole process seemed overwhelming though...
Title: Re: The Living PCB Design Thread
Post by: MOZ on Tue, 23 February 2016, 14:48:31
bpiph is a special type of crazy. //mkawa
Title: Re: The Living PCB Design Thread
Post by: BlueNalgene on Tue, 23 February 2016, 14:56:58
I made a small curved track for one of my oscillators.  I started with one of the microwave line length bits and then converted it to a 'part' which connected the oscillator to a wire.

(http://i.imgur.com/HX9SFLx.png)

Title: Re: The Living PCB Design Thread
Post by: sinusoid on Sun, 28 February 2016, 14:35:58
@MOZ,
OK, turned off 45deg turn in preferences, I could effectively route traces by hand, like it was done in ye olde days :)
It looks kinda nice. You just change the grid resolution to get better or worse detail.
[attach=1]

@bpiphany, BlueNalgene

I found you could actually do that by updating/reloading the netlist, but it's a PITA. edit: I mean, add or remove pre-built curve components.

This process works well for planning out connectors, too, like in the design above - I used 1 pin slots I could move around to avoid route intersections, that then can be replaced by 2x3 and 2x4 connectors in the example posted above. You just update the netlist with the new components and reload, then just update the routes.

Though... if we keep standard route distances, that predetermines the diameters of possible curves. They could be generated in 15 degree lengths and get loaded into the PCB with the net list. I think you could even keep a separate netlist for these...

Edit:
it's actually nice to pre-punch vias on a lesser grid resolution if you wanna keep them symmetric/in line, and then route to/from them manually later.

edit 2: whoa that was some mental shortcuts right there ;_;
Title: Re: The Living PCB Design Thread
Post by: funderburker on Sat, 05 March 2016, 03:53:06
Hi!

What's a good read for a beginner about electronics all together?
I would like to try making my own PCBs but I don't know that much about electronics. I don't even know where to start looking when it comes to what components would I need to make a numpad PCB, for example. I found some tutorials about KiCad and am getting used to the software by going along with the tutorials but I don't know where to start planning with a PCB design of my own.
Title: Re: The Living PCB Design Thread
Post by: sinusoid on Sat, 05 March 2016, 08:20:42
@funderburker,

The easiest way is to start with Arduino. There is plenty of tutorials online, for example on youtube. You can buy starter kits for this quite easily.
Several people make tutorials on the same subjects, so if you can't understand something from one tutorial, go to the other.

Some things you need to answer to yourself before you start learning:

1. Do you want to be proficient at it, or make a single project, or get some base knowledge so you can create stuff occasionally?
This describes your engagement, and determines how much time and money you should be investing into it.
It also describes whether you should pay someone to do it, or do it yourself.
You will need tools and materials to solder/desolder stuff, to etch the PCBs, you will need to buy components...

2. People learn differently. I think it's because their brains like to gather knowledge in different ways. You should first look at which mode fits you best:
- read all the books on the subject, memorize everything, think out your project, and only then proceed to create it, or,
- jump head first, making a lot of mistakes, and building the knowledge as you go.
Find out which of these work best for you, and follow it.
In both cases, prepare your education materials! Don't dive into the details straight away. See what exact things you need to learn to reach your aim. Try not to off-topic into other interesting things too much. Stay focused and aim-oriented.

I'd suggest finding a local hackerspace or makerspace (http://makeriga.org/ perhaps?) to get you started, and work in a way where you get your results quickly.
A nice starter project is to get an arduino, and:
- upload a code to it that makes the computer recognize it as a human interface device (HID). There is a ready code for that online, look around.
- wire a switch to it, and program the arduino to send a keypress info to the computer when you click the switch.

And on a final note, if you want to gain proficiency, don't ask. Search.
Why?
First of all, people will most often give you replies you're not ready for. The experienced ones will give you complex answers. The inexperienced ones will give you bad answers.
Second of all, this teaches you how to formulate search queries, what to look for, and how to apply that to your project. You'll be doing a lot of that in the future, even as an experienced EE! Saw Stackoverflow? Seen its popularity? It's not there without a reason!
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Sat, 05 March 2016, 12:55:40
kicad noob trying to learn more.

is there a Matias/CherryMX universal footprint out there anywhere? if so pleas point me in that direction
Title: Re: The Living PCB Design Thread
Post by: funderburker on Mon, 07 March 2016, 08:21:39
@funderburker,

The easiest way is to start with Arduino. There is plenty of tutorials online, for example on youtube. You can buy starter kits for this quite easily.
Several people make tutorials on the same subjects, so if you can't understand something from one tutorial, go to the other.

Some things you need to answer to yourself before you start learning:

1. Do you want to be proficient at it, or make a single project, or get some base knowledge so you can create stuff occasionally?
This describes your engagement, and determines how much time and money you should be investing into it.
It also describes whether you should pay someone to do it, or do it yourself.
You will need tools and materials to solder/desolder stuff, to etch the PCBs, you will need to buy components...

2. People learn differently. I think it's because their brains like to gather knowledge in different ways. You should first look at which mode fits you best:
- read all the books on the subject, memorize everything, think out your project, and only then proceed to create it, or,
- jump head first, making a lot of mistakes, and building the knowledge as you go.
Find out which of these work best for you, and follow it.
In both cases, prepare your education materials! Don't dive into the details straight away. See what exact things you need to learn to reach your aim. Try not to off-topic into other interesting things too much. Stay focused and aim-oriented.

I'd suggest finding a local hackerspace or makerspace (http://makeriga.org/ perhaps?) to get you started, and work in a way where you get your results quickly.
A nice starter project is to get an arduino, and:
- upload a code to it that makes the computer recognize it as a human interface device (HID). There is a ready code for that online, look around.
- wire a switch to it, and program the arduino to send a keypress info to the computer when you click the switch.

And on a final note, if you want to gain proficiency, don't ask. Search.
Why?
First of all, people will most often give you replies you're not ready for. The experienced ones will give you complex answers. The inexperienced ones will give you bad answers.
Second of all, this teaches you how to formulate search queries, what to look for, and how to apply that to your project. You'll be doing a lot of that in the future, even as an experienced EE! Saw Stackoverflow? Seen its popularity? It's not there without a reason!

Wow, thank you for the thorough advice! Will have to sit down and think about these questions on my own. And kudos on checking my local hackerspace.
But a short answer to the first question: I want to learn enough that I can make stuff from time to time. I recently got into mechs and now I just want to know more about electronics and be able to repair/make something on my own.
I hand-wired my first keyboard and it was so tedious that for my next project I would like to make a PCB. And for the projects to come, hopefully.
It would be really helpful for work too because I'm working on a hardware products and this knowledge would help for prototyping stages.
Title: Re: The Living PCB Design Thread
Post by: iss on Mon, 07 March 2016, 11:38:05
kicad noob trying to learn more.

is there a Matias/CherryMX universal footprint out there anywhere? if so pleas point me in that direction

https://geekhack.org/index.php?topic=48851.msg1240670#msg1240670

CHERRY_ALPS_PLATED should have what you need.
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Mon, 07 March 2016, 11:54:14
kicad noob trying to learn more.

is there a Matias/CherryMX universal footprint out there anywhere? if so pleas point me in that direction

https://geekhack.org/index.php?topic=48851.msg1240670#msg1240670

CHERRY_ALPS_PLATED should have what you need.
Sweeeeeeet. My upcoming project thanks you. (67%)
Title: Re: The Living PCB Design Thread
Post by: Fourfour on Wed, 18 May 2016, 16:22:55
I know people posting the same (hopefully) schematic have asked this question before, but I'm very paranoid about making mistakes as this is my first go at making a PCB. Would someone mind checking this sample of my keyboard matrix schematic and my teensy replacement schematic? Also my first post on geekhack!
(http://i.imgur.com/PbHfnGr.jpg)
(http://i.imgur.com/kva5d4D.jpg)
Title: Re: The Living PCB Design Thread
Post by: MOZ on Wed, 18 May 2016, 16:42:46
looks good :thumb:
Title: Re: The Living PCB Design Thread
Post by: Fourfour on Wed, 18 May 2016, 16:44:46
Thank you!! Now to finish working out the mess of tracks...
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Wed, 18 May 2016, 18:35:07
Thank you!! Now to finish working out the mess of tracks...
If MOZ says it looks good its good :D

Also welcome to GH
Title: Re: The Living PCB Design Thread
Post by: Fourfour on Wed, 18 May 2016, 18:53:50
I'm new but I've seen enough of his posts to trust his opinion   :D

And thanks! I actually have another question. I can't figure out what type of crystal I should use. Could someone point me to where I could buy the right one/what the footprint of that one is?
Title: Re: The Living PCB Design Thread
Post by: MOZ on Wed, 18 May 2016, 19:06:55
Quote from: mrbishop link=topic=48851.msg2174715#msg2174715
If MOZ says it looks good its good :D

Nothing like that, I just use the Teensy and GH60 schematics as reference.
Title: Re: The Living PCB Design Thread
Post by: komar007 on Thu, 19 May 2016, 15:24:17
Show Image
I know people posting the same (hopefully) schematic have asked this question before, but I'm very paranoid about making mistakes as this is my first go at making a PCB. Would someone mind checking this sample of my keyboard matrix schematic and my teensy replacement schematic? Also my first post on geekhack!
(http://i.imgur.com/PbHfnGr.jpg) (http://i.imgur.com/PbHfnGr.jpg)

(http://i.imgur.com/kva5d4D.jpg) (http://i.imgur.com/kva5d4D.jpg)

Welcome to geekhack!

Good job. You should connect UGND to ground.

[...] I can't figure out what type of crystal I should use. Could someone point me to where I could buy the right one/what the footprint of that one is?

What kind of other components are you using and how much space is there on the board?
Can you afford to use a big THT crystal or is SMD better?
I usually use 2.5x2mm 4-pad SMD crystals, like Epson FA-20H. I can recommend those.
Title: Re: The Living PCB Design Thread
Post by: Fourfour on Fri, 20 May 2016, 10:17:31
Show Image
I know people posting the same (hopefully) schematic have asked this question before, but I'm very paranoid about making mistakes as this is my first go at making a PCB. Would someone mind checking this sample of my keyboard matrix schematic and my teensy replacement schematic? Also my first post on geekhack!
(http://i.imgur.com/PbHfnGr.jpg) (http://i.imgur.com/PbHfnGr.jpg)

(http://i.imgur.com/kva5d4D.jpg) (http://i.imgur.com/kva5d4D.jpg)

Welcome to geekhack!

Good job. You should connect UGND to ground.

[...] I can't figure out what type of crystal I should use. Could someone point me to where I could buy the right one/what the footprint of that one is?

What kind of other components are you using and how much space is there on the board?
Can you afford to use a big THT crystal or is SMD better?
I usually use 2.5x2mm 4-pad SMD crystals, like Epson FA-20H. I can recommend those.

Thanks for the help! I would prefer SMD, so that looks perfect, but I can't seem to find it in stock anywhere with reasonable shipping to the U.S. :/
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Fri, 20 May 2016, 10:19:36
Show Image
I know people posting the same (hopefully) schematic have asked this question before, but I'm very paranoid about making mistakes as this is my first go at making a PCB. Would someone mind checking this sample of my keyboard matrix schematic and my teensy replacement schematic? Also my first post on geekhack!
(http://i.imgur.com/PbHfnGr.jpg) (http://i.imgur.com/PbHfnGr.jpg)

(http://i.imgur.com/kva5d4D.jpg) (http://i.imgur.com/kva5d4D.jpg)

Welcome to geekhack!

Good job. You should connect UGND to ground.

[...] I can't figure out what type of crystal I should use. Could someone point me to where I could buy the right one/what the footprint of that one is?

What kind of other components are you using and how much space is there on the board?
Can you afford to use a big THT crystal or is SMD better?
I usually use 2.5x2mm 4-pad SMD crystals, like Epson FA-20H. I can recommend those.

Thanks for the help! I would prefer SMD, so that looks perfect, but I can't seem to find it in stock anywhere with reasonable shipping to the U.S. :/

tried digikey or newark.com?

i like newark they are in SC like me LOL
Title: Re: The Living PCB Design Thread
Post by: Fourfour on Fri, 20 May 2016, 10:22:41
Show Image
I know people posting the same (hopefully) schematic have asked this question before, but I'm very paranoid about making mistakes as this is my first go at making a PCB. Would someone mind checking this sample of my keyboard matrix schematic and my teensy replacement schematic? Also my first post on geekhack!
(http://i.imgur.com/PbHfnGr.jpg) (http://i.imgur.com/PbHfnGr.jpg)

(http://i.imgur.com/kva5d4D.jpg) (http://i.imgur.com/kva5d4D.jpg)

Welcome to geekhack!

Good job. You should connect UGND to ground.

[...] I can't figure out what type of crystal I should use. Could someone point me to where I could buy the right one/what the footprint of that one is?

What kind of other components are you using and how much space is there on the board?
Can you afford to use a big THT crystal or is SMD better?
I usually use 2.5x2mm 4-pad SMD crystals, like Epson FA-20H. I can recommend those.

Thanks for the help! I would prefer SMD, so that looks perfect, but I can't seem to find it in stock anywhere with reasonable shipping to the U.S. :/

tried digikey or newark.com?

i like newark they are in SC like me LOL

Digikey doesn't seem to have it in stock and newark says there is a $20 freight charge per order  :(
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Fri, 20 May 2016, 10:27:26
More
Show Image
I know people posting the same (hopefully) schematic have asked this question before, but I'm very paranoid about making mistakes as this is my first go at making a PCB. Would someone mind checking this sample of my keyboard matrix schematic and my teensy replacement schematic? Also my first post on geekhack!
(http://i.imgur.com/PbHfnGr.jpg) (http://i.imgur.com/PbHfnGr.jpg)

(http://i.imgur.com/kva5d4D.jpg) (http://i.imgur.com/kva5d4D.jpg)


Welcome to geekhack!

Good job. You should connect UGND to ground.

[...] I can't figure out what type of crystal I should use. Could someone point me to where I could buy the right one/what the footprint of that one is?

What kind of other components are you using and how much space is there on the board?
Can you afford to use a big THT crystal or is SMD better?
I usually use 2.5x2mm 4-pad SMD crystals, like Epson FA-20H. I can recommend those.

Thanks for the help! I would prefer SMD, so that looks perfect, but I can't seem to find it in stock anywhere with reasonable shipping to the U.S. :/

tried digikey or newark.com?

i like newark they are in SC like me LOL

Digikey doesn't seem to have it in stock and newark says there is a $20 freight charge per order  :(

try to check the similar items. thats a name brand crystal. you may be able to find one less expensive and NOT at their UK facility, which is why they are charging SOOOOOO much for shipping come to find out. i clicked on the 40Hz crystal and found some similar items that may fit what your needing but i'm no electronics expert in this matter so i'd see if you can find one then post here to confirm it will work unless you already know if it will or wont :)

hope this helps! best of luck!!!

there is always ebay/amazon but for specialty stuff like this its hit or miss at best.
Title: Re: The Living PCB Design Thread
Post by: MOZ on Fri, 20 May 2016, 10:35:33
We used this for the GHPad
www.digikey.com/product-detail/en/7M-16.000MAAJ-T/887-1125-1-ND/2119014
Title: Re: The Living PCB Design Thread
Post by: Fourfour on Fri, 20 May 2016, 10:53:28
We used this for the GHPad
www.digikey.com/product-detail/en/7M-16.000MAAJ-T/887-1125-1-ND/2119014

That looks great, thanks!

You all are very helpful, this is a nice place  ;D
Title: Re: The Living PCB Design Thread
Post by: climbalima on Fri, 27 May 2016, 15:34:26
does anybody have a trrs port kicad footprint?
Title: Re: The Living PCB Design Thread
Post by: MOZ on Fri, 27 May 2016, 16:11:26
You can check the one used by Ergodox.
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Thu, 09 June 2016, 22:28:46
is there a repo somewhere that outlines a logic controller that would support larger keyboards such as the at90usb1286 that the Teensy 2.0 ++ uses. KiCAD please.

even a kicad schematic of a teensy 2++. i'm looking for a default jumping off point for future keyboard designs that have build on logic controllers. thanks  :thumb:
Title: Re: The Living PCB Design Thread
Post by: joey on Fri, 10 June 2016, 06:36:59
is there a repo somewhere that outlines a logic controller that would support larger keyboards such as the at90usb1286 that the Teensy 2.0 ++ uses. KiCAD please.

even a kicad schematic of a teensy 2++. i'm looking for a default jumping off point for future keyboard designs that have build on logic controllers. thanks  :thumb:
Shouldn't be too hard to import this into KiCAD: https://www.pjrc.com/teensy/schematic2pp.gif
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Fri, 10 June 2016, 07:14:48
is there a repo somewhere that outlines a logic controller that would support larger keyboards such as the at90usb1286 that the Teensy 2.0 ++ uses. KiCAD please.

even a kicad schematic of a teensy 2++. i'm looking for a default jumping off point for future keyboard designs that have build on logic controllers. thanks  :thumb:
Shouldn't be too hard to import this into KiCAD: https://www.pjrc.com/teensy/schematic2pp.gif

for someone who is more in tune with hardware design i would agree with you :D sadly i am not that person :P
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Fri, 10 June 2016, 07:22:34
i know there have been many projects geared around this in the past as a daughterboard. what i am looking for is the schematic and maybe the PCB footprint for one that i can use in keyboard projects big and small hence the reference to the larger AT90USB1286. this would allow more scaleability. sadly i am still teaching myself hardware design and learning from people here and there. Perhaps this should be broken out into a community project in its own thread unless it already exists.
Title: Re: The Living PCB Design Thread
Post by: MOZ on Fri, 10 June 2016, 07:46:27
We're actively over at DT working on an ARM based solution that provides about 32 IO pins
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Fri, 10 June 2016, 07:48:04
We're actively over at DT working on an ARM based solution that provides about 32 IO pins

its funny ive been waiting for you to jump in on this MOZ  :thumb:
can i get the link to the thread either here or in PM pleeeeeeeeeeease  :D
Title: Re: The Living PCB Design Thread
Post by: dhcabinian on Tue, 14 June 2016, 21:07:20
Hello! I'm a long time lurker of the GH forums and I recently decided to start a keyboard project. My current implementation includes the following:


I was wondering if you guys might take a look at my schematic and point out any errors or trouble I may run into. Thanks for any help!

Here is the schematic: http://imgur.com/a/UNtnN

*Credit to Komar777, Jack Humbert, Adafruit and others for their schematics which mine is based on.

** FB Pin in charging circuit has been fixed and updated with new Imgur
Title: Re: The Living PCB Design Thread
Post by: kolec94 on Mon, 04 July 2016, 11:47:53
Hello! I'm a long time lurker of the GH forums and I recently decided to start a keyboard project. My current implementation includes the following:

  • 68% Cherry MX Keys
  • RGB Backlight per Key using WS2812B
  • RGB Underglow using WS2812B
  • Bluetooth using a Bluefruit EZ Key HID
  • Battery Charging Circuit

I was wondering if you guys might take a look at my schematic and point out any errors or trouble I may run into. Thanks for any help!

Here is the schematic: http://imgur.com/a/UNtnN

*Credit to Komar777, Jack Humbert, Adafruit and others for their schematics which mine is based on.

** FB Pin in charging circuit has been fixed and updated with new Imgur
what is the power draw of all those ws2812b's?
Title: Re: The Living PCB Design Thread
Post by: dhcabinian on Tue, 05 July 2016, 21:00:53
Hello! I'm a long time lurker of the GH forums and I recently decided to start a keyboard project. My current implementation includes the following:

  • 68% Cherry MX Keys
  • RGB Backlight per Key using WS2812B
  • RGB Underglow using WS2812B
  • Bluetooth using a Bluefruit EZ Key HID
  • Battery Charging Circuit

I was wondering if you guys might take a look at my schematic and point out any errors or trouble I may run into. Thanks for any help!

Here is the schematic: http://imgur.com/a/UNtnN

*Credit to Komar777, Jack Humbert, Adafruit and others for their schematics which mine is based on.

** FB Pin in charging circuit has been fixed and updated with new Imgur
what is the power draw of all those ws2812b's?

50mA is quoted in the datasheet. I have since changed the design to sk6812minis. They consume the same 50mA according to the datasheet but apparently other keyboard prototypes have had success with these same LED's by limiting the current consumption via decreasing brightness. Most notable of these is the new 62/60.
Title: Re: The Living PCB Design Thread
Post by: layornos on Thu, 04 August 2016, 12:53:57
Hello all,

i am trying to design a pcb for a ortholinear keyboard which is usable for both sides, like the pcb of the ErgoDox. A diode between UVCC and PIN1 to detect if USB is connected. Someone suggested that in use a jumpers, but i have no clue how i can use them. Can someone help me?

[attach=1]

[attach=2]

[attach=3]
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Sun, 07 August 2016, 13:53:31
looking for the slotted through hole mini usb kicad footprint. for some reason i can't find any. any help would be awesome.
Title: Re: The Living PCB Design Thread
Post by: hasu on Sun, 07 August 2016, 15:03:21
looking for the slotted through hole mini usb kicad footprint. for some reason i can't find any. any help would be awesome.

I use Hirose UX60SC-MB-5S8 on my boards and have KiCAD module.
https://github.com/tmk/keyboard_parts.pretty/blob/master/USB_miniB_hirose_5S8.kicad_mod
http://www.digikey.com/product-detail/en/hirose-electric-co-ltd/UX60SC-MB-5S8/H11589CT-ND/1949225
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Sun, 07 August 2016, 15:06:28
I literally just found that on SnapEDA lol great minds Hasu. Thanks so much.

sent from my chess board

Title: Re: The Living PCB Design Thread
Post by: twiddle on Mon, 08 August 2016, 17:50:21
Just figured I'd post a few shots of my most recent PCBs. This is one of four custom game controller designs developed with my students.
Here's the layout:

(http://i.imgur.com/5c08pu6.png)
(http://i.imgur.com/kKwPjdA.png)


And here's the final results. This time I tried out a new supplier - ALLPCB.
From what I can tell, ALLPCB are basically agents with contacts at a ton of different factories in China. You submit your requirements, and they recommend a few different board houses who all give you online quotes. ALLPCB handle talking to the factory for you and so on, regardless.
This time I used WMD Circuits: http://wmdpcb.en.ecplaza.net

I paneled all four designs and sent them through as a single order, standard 1.6mm/6mil trace and space, ENIG finish.
The price for ENIG was very competitive, even including DHL shipping to Australia and 2day rush fees my order was about $120USD for 10 of each panel of the 4 designs (for a total of 40 boards).

(http://i.imgur.com/0OpXL8N.jpg)
(http://i.imgur.com/LfrDwzi.jpg)

Anyways, people always ask about low-cost fabs so I figured I'd throw their name out while I was showing off the layout.
Title: Re: The Living PCB Design Thread
Post by: BlueNalgene on Mon, 05 September 2016, 18:17:49
Anybody feel like helping me diagnose a problem?  My USB D+ line is at ~0V in the attached circuit.  What have I missed?
Title: Re: The Living PCB Design Thread
Post by: twiddle on Mon, 05 September 2016, 18:28:13
Do you need an external pullup on D+ with that chip, or is it internal?
If it's internal I'd verify your firmware is actually enabling it, theres usually a register for 'soft connect' or something like that that you should be using.
Title: Re: The Living PCB Design Thread
Post by: hasu on Mon, 05 September 2016, 18:34:04
UVCC should be connected.

Tapatalk を使用して私の Nexus 5X から送信

Title: Re: The Living PCB Design Thread
Post by: BlueNalgene on Mon, 05 September 2016, 18:49:46
UVCC should be connected.

Tapatalk を使用して私の Nexus 5X から送信

I'm pretty sure this is the answer.  I'll reply back after I work on it again. 
Title: Re: The Living PCB Design Thread
Post by: BlueNalgene on Tue, 06 September 2016, 16:41:17
I'm pretty sure this is the answer.  I'll reply back after I work on it again. 

I'm back.

UVCC should be connected.

UVCC and AVCC are both connected and at 5V.  No USB.  The D+ line is still 0V.

Do you need an external pullup on D+ with that chip, or is it internal?
If it's internal I'd verify your firmware is actually enabling it, theres usually a register for 'soft connect' or something like that that you should be using.
This IC has an internal selectable pullup.  I added a 1.5k pullup on the D+ line just to test.  This makes the D+ the correct voltage, but there is still no response from the computer.
Title: Re: The Living PCB Design Thread
Post by: hasu on Tue, 06 September 2016, 17:14:25
Then I would check oscillation of xtal, load capacitance also should be confirmed with referring to datasheet.

Sent from my Nexus 5X

Title: Re: The Living PCB Design Thread
Post by: regack on Tue, 06 September 2016, 19:20:50
I'm pretty sure this is the answer.  I'll reply back after I work on it again. 

I'm back.

UVCC should be connected.

UVCC and AVCC are both connected and at 5V.  No USB.  The D+ line is still 0V.

Do you need an external pullup on D+ with that chip, or is it internal?
If it's internal I'd verify your firmware is actually enabling it, theres usually a register for 'soft connect' or something like that that you should be using.
This IC has an internal selectable pullup.  I added a 1.5k pullup on the D+ line just to test.  This makes the D+ the correct voltage, but there is still no response from the computer.

I'm not sure if it's strictly required, but the Atmel reference puts a pullup resistor on reset as well.  Other than UVCC to Vcc and and the 10k pullup on reset, my ATMEGA32U2 schematic looks about the same as yours.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 07 September 2016, 02:11:22
I've never used any pull-resistors on the data lines. I read somewhere about the 32u4 that you can add one to one of the lines to make it run USB 1.1 (or something like that). The 32u2 lacks this property though.

I've also never used a pull-up on reset.  I've seen different sorts of filters for it, but the only development board I've got that uses one just f#"!s the reset functionality up. The internal pull-up on reset is quite large compared to the rest if I remember correctly, but still I've never heard of spurious resets due to noise or anything else with only the internal pull-up.
Title: Re: The Living PCB Design Thread
Post by: vvp on Wed, 07 September 2016, 02:56:02
I did the same with the two boards I built myself. Only internal pullups on MCU data lines and on its NRST line. No filtering capacitor on ATXMega NRST line (because it is used also as clock for the debugging interface). But I did put there a filtering capacitor on STM32F373 NRST line (pullup still was only internal). It works all fine so far.
Title: Re: The Living PCB Design Thread
Post by: MacGruber117 on Sat, 17 September 2016, 15:37:14
Hello! I'm trying to design my first PCB with zero background in electronics. Everything I know about keyboard and PCB design comes from this thread, bpiphany's pcb tutorial, and what I've gleaned from Sparkfun tutorials. Here is the layout I'm trying to design for:

(http://i.imgur.com/8srfpJc.png)

I think I might be jumping right into the deep end with such a large board, but oh well. I'm pretty confident that I wired the matrix correctly in the schematic, but I don't know what is required for in switch LEDs and how that all hooks up to the controller. Could someone point me in the direction of a schematic for a similar sized board with LEDs? Any other advice or tutorials for a noob would be extremely appreciated. Thanks!
Title: Re: The Living PCB Design Thread
Post by: ЫъГЬ on Wed, 21 September 2016, 16:03:01
Hello. I'm new to mechanical keyboard business, but somewhat less new to electronics.

I'm thinking about trying to build a keyboard and what I don't understand is why all of the designs (both hobbyist and mass produced) seem to use key matrices. When I'm thinking of scanning massive number of keys I'm thinking of shift registers such as 74HC165 which are durty cheap and can be daisy chained to use as low as 3 (iirc) pins on microcontroller. Each being 8bit it'll take about 14 of them to drive full size keyboard and even something like Attiny 2313 can pull referesh rate of several kHz on them.
I understand designing board with this approach it's not quite as easy as wiring through-hole diodes pin to pin, but should it be used at least in commercial deigns?
Is there some critical part I'm missing?
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Thu, 22 September 2016, 15:35:59
From a commercial perspective, what advantage do you gain by bringing more components into the mix? For $2-3/unit I can buy mcu's (in bulk) that have plenty of pins for a full sized keyboard. My firmware programming is more straightforward. I have fewer parts that can fail. I can scan the matrix fast enough that latency isn't a concern. What will I gain by bringing shift registers into the mix?
Title: Re: The Living PCB Design Thread
Post by: ЫъГЬ on Fri, 23 September 2016, 02:22:09
They render ghosting and jamming inapplicable. With matrix design you can't avoid both and have to deal with them either programmatically or with extra components. When each key is wired directly to a pin (MCU or shift register) this problems simply does not exist. This is where firmware gets simpler as well, you're just reading serial bits and that's it, a bit for each key in a single loop. Reading matrix involves two loops for two pins and additional calculations to figure out simultaneous presses and which of them actually happened. So, it's the opposite, matrix is more complex and shift register more straightforward

As for pricing, $2-3 is the price of about 50 Texas Instruments 74HC series registers even on end-consumer market.
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Fri, 23 September 2016, 15:33:42
Maybe you should make a design around shift registers then. I've been trying to wrap my head around how it'd be simpler, and it still strikes me as more complicated. For example, how do you daisy chain shift registers so you only use 3 pins on the mcu?

Having a design we can actually point to and talk about would make discussing the pro's/con's easier.
Title: Re: The Living PCB Design Thread
Post by: twiddle on Fri, 23 September 2016, 15:51:16
I've been trying to wrap my head around how it'd be simpler, and it still strikes me as more complicated. For example, how do you daisy chain shift registers so you only use 3 pins on the mcu?

The shift registers have serial input pins (DS) as well as serial out (Q7). You can daisy-chain Q7 from one to the DS of the next, and then only need to use the mcu to read Q7 for the final shift register.
 
If you're connecting every switch to a shift register input, though, I'd think it also would make routing much more complex. Traces don't have a cost as such, of course, but I'm not sure how easily you would route a full 108 keys on say a 2-layer board, especially if you had LED support, and while I don't usually worry about EMI/FCC, even if it's possible to route I would guess it would be much messier and perhaps more likely to run into issues as an unintentional emitter?

On the issue of cost, that same $2 gets me 450 1n4148s. Quick search of Octopart shows 74hc165 at 8c each, but only in 2500 quantity. Thats feasible for commercial enterprises but I couldn't find anything close to the price mentioned here of a hypothetical 6c each in smaller quantities, more like 30c each in 1s or 100s.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Fri, 23 September 2016, 17:17:26
With shift registers you also need pull resistors. So that's a one-to-one correspondence to the matrix diodes.

Shift registers scale easier, adding more keys. But that's probably about it. Well actually smaller chips are easier to fit somewhere too. But it's hardly a coincidence that all(?) commercial keyboards are matrix based.

Even fly-wiring a keyboard is easier in matrix form. 100+ cables is a guaranteed mess..

Also enthusiast custom keyboards require quite a bit of flash memory to store keymaps and the such. The smaller chips may sometimes have less memory as well as pins.

How is reading serial easier than a matrix? Activate row - read columns, can't get much simpler..

And it's already been done, by YT =) https://geekhack.org/index.php?topic=67713
Title: Re: The Living PCB Design Thread
Post by: ЫъГЬ on Sat, 24 September 2016, 06:59:23
For example, how do you daisy chain shift registers so you only use 3 pins on the mcu?

Basically each has a dedicated daisy chain pin. From controller's perspective two chained 8bit registers are no different from one 16bit.

I'm not sure how easily you would route a full 108 keys
The schematic I have in my head groups keys with registers. Say, QWER-TASDF are all wired to one SR positioned somewhere in the middle of the group which is then wired to the main data lines. Then there's TYUI-GHJK group, etc... Shouldn't be too messy as it only requires about 3 global buses.

I don't have a design planned since at this point I was just trying to figure out in general whether it's possible in theory.

And it's already been done, by YT =) https://geekhack.org/index.php?topic=67713
Great, this is exactly what I was looking for, thanks. Seems like there was a working concept at the very least. Are there any functioning boards built on that PCB?
Title: Re: The Living PCB Design Thread
Post by: MacGruber117 on Sat, 24 September 2016, 14:37:46
This post is very similar to Fourfour's post since I copied his teensy replacement board for my layout. Here is my schematic with controller:
(http://i.imgur.com/YFTZMys.png)
(http://i.imgur.com/EDFDtlc.png)
I'm an extreme noob, so I'm hoping this controller will work. I was also hoping to add LEDs to this board, but I don't think I have enough I/O pins to support that. Is there a different controller I should be using? Would adding an I/O expander be a good option? I'm also struggling to find a schematic showing how in switch LEDs figure into the schematic, so if someone could point me to any info on that I'd really appreciate it. Thanks!
Title: Re: The Living PCB Design Thread
Post by: sypl on Tue, 27 September 2016, 13:46:17
I'd like to use a small SMD crystal but I'm not sure if my schematic is right.

Here's one with two poles.
[attach=1]

I want to use something with this footprint:
[attach=2]

I think it's connected like this:
[attach=3]

Can anyone confirm whether this is correct or not?
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Tue, 27 September 2016, 16:27:45
You are most probably wrong. Pins 1 and 3 are usually the connections to the crystal, pins 2 and 4 are GND pins, or rather shield pins. I don't think they actually need to be connected at all.

Well, actually your image even shows this. All this of course depends on which way the pins are ordered in your footprint in the end. But pin 1 and 3 of the package is the connections to the crystal.
Title: Re: The Living PCB Design Thread
Post by: sypl on Thu, 29 September 2016, 04:57:27
Yes, you're right, the numbers on the footprint don't match up with the schematic.

If I connect 1 to XTAL1 and 3 to XTAL2 that should be enough, right? I think it's probably best to 2 and 4 to ground, just in case.
Title: Re: The Living PCB Design Thread
Post by: vvp on Thu, 29 September 2016, 05:56:57
I would ground them since it is easy to do and you do not risk thermally damaging the crystal.
You may find this (http://www.st.com/content/ccc/resource/technical/document/application_note/c6/eb/5e/11/e3/69/43/eb/CD00221665.pdf/files/CD00221665.pdf/jcr:content/translations/en.CD00221665.pdf) interesting too. It is not for ATmega but maybe you can find similar document for ATmega too.
Title: Re: The Living PCB Design Thread
Post by: monkeyplusplus on Thu, 29 September 2016, 14:20:39
Hi all,

I'm working on a little 40 key ortholiniar board, having lots of fun figuring out all the steps necessary for creating a PCB. My layout is heavily derivative of the Planck, and I actually used the public GH60 design to start me off with the integrated controller. I've gone through this thread and learned a lot, but I'm still just starting out, so I'm probably doing some things wrong. I did notice that the diodes on the GH60 design were laid out differently than what I'm used to for hand wiring a board, so I changed that to be what I'm used to. For the controller, I'm just hoping that what I've kitbashed from the GH60 is a good start. Could anyone here offer me pointers for improving this schematic? Thank you for your time :D

(http://uploads.tapatalk-cdn.com/20160929/4dae60c357ac4e2a137f8e3dd0164c1e.jpg)
Title: Re: The Living PCB Design Thread
Post by: 27.9.2016 on Mon, 03 October 2016, 12:36:53
Hello

I have started creating my own PCB for standard 60% keyboard and i have some questions:

1. Where can I find the standard distance between the switches (cherry mx) for 60% layout
(http://i.imgur.com/6fByesz.png)

2. Is it okey to connect switch to diode and to teensy or i have to add anything else?
(http://i.imgur.com/WqEuQdr.png)

3. And last one about matrix what do you think is okey?
(http://i.imgur.com/Orm7j86.jpg)

Thank you for help  :thumb:
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 03 October 2016, 14:51:24
The center to center (c-c) distance is measured in units of 0.75". Keys come in widths of 1.00u 1.25u 1.50u 1.75u  2.00u 2.25u 2.75u 6.25u. There are others, but those are the most common. Your distance indicated by the red arrows is meaningless and will depend on the exact footprint you use. That is why c-c distances are regularly used for these kind of things.
Title: Re: The Living PCB Design Thread
Post by: dantan on Sun, 09 October 2016, 22:00:03
I'm a newbie to PCB design and electronics.

I would like to design my own split layout keyboard someday. I was inspired by the Mistel Barocco and the SmartYao, but really want to build some skills to customize because I may want my own layout someday.

 I want to start with a very simple design and layout just to get my basics right. Maybe an ortholinear keyboard featuring 6 or 7 rows, and 8 columns. That should be enough to squeeze in all the basic keyboard functions for one half of a keyboard.

My PCB should be rigid enough to function as a PCB mounted keyboard. I think it is too much trouble and extra expense to design and cut a plate.

I propose to use Cherry MX keyswitches and a teensy 2.0, because that's what I have used before and I don't have much experience. To get nkro I know I have to have diodes on every switch.

Am I right in saying that on my PCB I need to design paths for keyswitches leading to a place where I can mount a teensy daughterboard, and I also need to design paths for diodes leading... to where?

What next? Much of the discussion on this thread is beyond me. I really don't want to put down a lot of money (or time) on a CAD package and spend time building skills that I will never need. I'm hoping to make things as simple as possible for my first run. No leds or lock lights or staggered key placements. Everything a 1.00u switch. I'll be overjoyed if my first PCB works.

Grateful for any advise. Thank you to all the nice helpful people in advance!
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 10 October 2016, 08:45:33
Look two posts up in monkeyplusplus's post. The diodes goes in series with the switch. Row-switch-diode-column, or Row-diode-switch-column, whichever you prefer.

You probably want the correct PCB thickness for PCB mount stabilizers to clip in properly. Rigidity can be accomplished in other ways.

KiCAD is good and free.
Title: Re: The Living PCB Design Thread
Post by: monkeyplusplus on Mon, 10 October 2016, 12:28:45
Yeah! I've learned SO MUCH by just sitting down and following each and every trace on the ergodox and gh60 boards. KiCad is super fun once you get the hang of it.
Title: Re: The Living PCB Design Thread
Post by: monkeyplusplus on Thu, 27 October 2016, 20:02:21
Holy cow it actually works! Already have things I want to do with the next iteration. I still have a lot to learn, but making something that actually functions is pretty addicting :)

In the photo below, the topmost board is a hand wired prototype, the middle one is a populated and flashed PCB version, and a naked PCB (one of the three I ordered from OSHPark) is on bottom.

(http://uploads.tapatalk-cdn.com/20161028/4080e5c638091ce525a2dc2a633d4eee.jpg)
Title: Re: The Living PCB Design Thread
Post by: monkeyplusplus on Thu, 27 October 2016, 20:22:06
(also, a Planck PCB in the background... Learned a lot from eyeballing that thing too. :D :D :D )
Title: Re: The Living PCB Design Thread
Post by: 27.9.2016 on Tue, 01 November 2016, 15:35:37
Holy cow it actually works! Already have things I want to do with the next iteration. I still have a lot to learn, but making something that actually functions is pretty addicting :)

In the photo below, the topmost board is a hand wired prototype, the middle one is a populated and flashed PCB version, and a naked PCB (one of the three I ordered from OSHPark) is on bottom.

Show Image
(http://uploads.tapatalk-cdn.com/20161028/4080e5c638091ce525a2dc2a633d4eee.jpg)


Hello can you tell me how big are your soldering pads (http://image.prntscr.com/image/87f3a09f174044bc98bb4553822a236d.png)

Thank you
Title: Re: The Living PCB Design Thread
Post by: monkeyplusplus on Tue, 01 November 2016, 15:42:19
Holy cow it actually works! Already have things I want to do with the next iteration. I still have a lot to learn, but making something that actually functions is pretty addicting :)

In the photo below, the topmost board is a hand wired prototype, the middle one is a populated and flashed PCB version, and a naked PCB (one of the three I ordered from OSHPark) is on bottom.

Show Image
(http://uploads.tapatalk-cdn.com/20161028/4080e5c638091ce525a2dc2a633d4eee.jpg)


Hello can you tell me how big are your soldering pads
Show Image
(http://image.prntscr.com/image/87f3a09f174044bc98bb4553822a236d.png)


Thank you
Sure, for which component? I used the library from the GH60 board, which helped out quite a bit.
Title: Re: The Living PCB Design Thread
Post by: 27.9.2016 on Tue, 01 November 2016, 15:53:57
Holy cow it actually works! Already have things I want to do with the next iteration. I still have a lot to learn, but making something that actually functions is pretty addicting :)

In the photo below, the topmost board is a hand wired prototype, the middle one is a populated and flashed PCB version, and a naked PCB (one of the three I ordered from OSHPark) is on bottom.

Show Image
(http://uploads.tapatalk-cdn.com/20161028/4080e5c638091ce525a2dc2a633d4eee.jpg)


Hello can you tell me how big are your soldering pads
Show Image
(http://image.prntscr.com/image/87f3a09f174044bc98bb4553822a236d.png)


Thank you
Sure, for which component? I used the library from the GH60 board, which helped out quite a bit.

I need it for cherry mx switches, is this library available for eagle pcb to?
Title: Re: The Living PCB Design Thread
Post by: monkeyplusplus on Tue, 01 November 2016, 16:47:26
Oh, sorry, didn't see your image on mobile. For the one I'm using, the diameter is 2.49936mm and the drill hole is 1.50114mm

I'm sure these footprints exist for eagle, but alas I'm using kicad.
Title: Re: The Living PCB Design Thread
Post by: deadall127 on Sun, 06 November 2016, 08:14:13
Hi, can someone tells me the position of the enter switch on iso keyboard?

here is the actual position of it (in white):

(http://i.imgur.com/M9XkP3b.png)

EDIT:
sorry, I finally found it (after a loooong time)

(http://reho.st/preview/self/ca46b5aea11ac6c93e955eb3413fe31847f2c7cd.png)
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sun, 06 November 2016, 13:00:15
Yep, that's correct. Be sure to also rotate it 90° if you intend to ever use costar stabilizers.
Title: Re: The Living PCB Design Thread
Post by: Tye on Mon, 07 November 2016, 19:51:04
Having never designed a PCB nor keyboard, could I get a sanity check here? Any input or feedback is appreciated. I think I'm quickly approaching it being ready to send to fabrication.
Not even really sure what to ask about. It's a pretty straightforward board that I made complicated by making it split-able, adding built in support for a Trackpoint and lots of SK6812 LEDs.
Main project URL: https://easyeda.com/TyeEasyEDA/Boomerang_Keyboard-a2d4e41a4fbf4da490f883c4b93fd55c (https://easyeda.com/TyeEasyEDA/Boomerang_Keyboard-a2d4e41a4fbf4da490f883c4b93fd55c)

[attachimg=1]

[attachimg=2]

[attachimg=3]

[attachimg=4]
Title: Re: The Living PCB Design Thread
Post by: hanya on Mon, 07 November 2016, 21:42:48
Having never designed a PCB nor keyboard, could I get a sanity check here? Any input or feedback is appreciated. I think I'm quickly approaching it being ready to send to fabrication.
Not even really sure what to ask about. It's a pretty straightforward board that I made complicated by making it split-able, adding built in support for a Trackpoint and lots of SK6812 LEDs.
Main project URL: https://easyeda.com/TyeEasyEDA/Boomerang_Keyboard-a2d4e41a4fbf4da490f883c4b93fd55c (https://easyeda.com/TyeEasyEDA/Boomerang_Keyboard-a2d4e41a4fbf4da490f883c4b93fd55c)
Are VCC and GND pins for P8 Trackpoint connector swapped? CLK and DATA lines should be pulled-up, the capacitor direction is opposit and the RESET pin is active HIGH. So it seems VCC and GND are swapped on P8.
Title: Re: The Living PCB Design Thread
Post by: Tye on Tue, 08 November 2016, 00:29:38
Are VCC and GND pins for P8 Trackpoint connector swapped? CLK and DATA lines should be pulled-up, the capacitor direction is opposit and the RESET pin is active HIGH. So it seems VCC and GND are swapped on P8.
Yikes. Yes, those were swapped. Fixed. Thank you!

I do have a few specific questions that I'm still confused about:
1. I am especially uncertain if the resistors are set up correctly connected to the IO Expander on the left half.
2. Are the diodes in the right direction, considering that the board is split?
3. On the Ergodox, I see that most builds recommend that a capacitor is added to the left side at the IO Expander. What pins would I connect that to in this build?
Title: Re: The Living PCB Design Thread
Post by: hanya on Wed, 09 November 2016, 08:30:17
Yikes. Yes, those were swapped. Fixed. Thank you!

I do have a few specific questions that I'm still confused about:
1. I am especially uncertain if the resistors are set up correctly connected to the IO Expander on the left half.
2. Are the diodes in the right direction, considering that the board is split?
3. On the Ergodox, I see that most builds recommend that a capacitor is added to the left side at the IO Expander. What pins would I connect that to in this build?
Hi, Tye
1: I2C lines should be pulled-up to VCC. It looks ok for me.
2: Direction of diodes in the key matrix depends on MCU firmware. In your case, you have to read COL value while chaing ROW level. Some people connects diodes to ROW wise if they choose hand wiring. It is easier to connect output line horizontally while most keyboard have straight row of keys.
3: Decoupling/bypass capacitor should be placed near each VCC pins of ICs. If they has coupled GND pins with VCC pins, place a capacitor near both pins. In genral, 100nF (0.1uF) capacitor is used for such case. It reduces noise on power line or helps to make power line stable. You have dozen of LEDs on the board, so if you tern on many at the same time, the power source would be unstable.

- You have 1000uF capacitor on VBUS (5V) line but USB specification recommend capacitance up to 10uF on VBUS line for bus powred devices. They saids if capacitance is quite large, pins on USB connector would be melt by rush current when you connect plug.
- You should decide screw positions to fix the PCB in your case or something before moving some components around on the board.
- You can prepare additional pattern for spare capacitor on left side which can be soldered if your circuit is not stable enough.
- I have never used SK6812. Its datasheet recommend bypass capacitor on each SK6812 on typical circuit.
Title: Re: The Living PCB Design Thread
Post by: Tye on Thu, 10 November 2016, 16:22:28
2: Direction of diodes in the key matrix depends on MCU firmware. In your case, you have to read COL value while chaing ROW level. Some people connects diodes to ROW wise if they choose hand wiring. It is easier to connect output line horizontally while most keyboard have straight row of keys.
Thank you. So for a PCB split board, I think I'm okay.

3: Decoupling/bypass capacitor should be placed near each VCC pins of ICs. If they has coupled GND pins with VCC pins, place a capacitor near both pins. In genral, 100nF (0.1uF) capacitor is used for such case. It reduces noise on power line or helps to make power line stable. You have dozen of LEDs on the board, so if you tern on many at the same time, the power source would be unstable.
Please see other notes/questions below related to this.

- You have 1000uF capacitor on VBUS (5V) line but USB specification recommend capacitance up to 10uF on VBUS line for bus powred devices. They saids if capacitance is quite large, pins on USB connector would be melt by rush current when you connect plug.
This seemed weird to me too. It was suggested in a private message that I do this. It is from the suggestions here: https://learn.adafruit.com/adafruit-neopixel-uberguide/power .
I reduced it to 10uF per your suggestion. Can I add this capacitor directly from the Teensy's VCC and GND, as I show in the newest PCB version? This allows me to plug the USB cable directly into the Teensy and skip using a second USB like on the Ergodox.

- You can prepare additional pattern for spare capacitor on left side which can be soldered if your circuit is not stable enough.
I added a empty C4 cap between pins 1 and 11 on the IO expander. I also added a .1uF to help clean the signal. Is this what you mean?

- I have never used SK6812. Its datasheet recommend bypass capacitor on each SK6812 on typical circuit.
I will have to look into this more.

It's important to note that I don't ever plan on lighting up all the LEDs full brightness at the same time. I only want them for visual cues on the layers. For example: In main layer only light up asdf & jkl; . In navigation layer, light up hjkl and a few other keys in green to show Vim keys. If caps lock is on, light up the letter keys in a dim red.
My plan is NOT to light up my keyboard like a dance club.

THANK YOU for all your input! I really appreciate it and I'm excited to be so close to making this a reality.

[attachimg=1]
[attachimg=2]
Title: Re: The Living PCB Design Thread
Post by: Eszett on Thu, 17 November 2016, 19:08:04
Hi! One question. I've looked at the schematics of dhcabinian. What is the sense of having this capacitor near the USB connector? AFAIK a capacitor stabilizes a VCC signal near an IC, but the USB connector is a passive component, why having a capacitor there?
 (https://puu.sh/slTUT/5dac7b640c.png) (https://puu.sh/slTUT/5dac7b640c.png)
Title: Re: The Living PCB Design Thread
Post by: hanya on Sat, 19 November 2016, 07:54:03
Hi! One question. I've looked at the schematics of dhcabinian. What is the sense of having this capacitor near the USB connector? AFAIK a capacitor stabilizes a VCC signal near an IC, but the USB connector is a passive component, why having a capacitor there?
 (https://puu.sh/slTUT/5dac7b640c.png) (https://puu.sh/slTUT/5dac7b640c.png)
It is used to increase response of power line if power source is placed far away from the circuit. The capacitor works like a power tank for the local circuit. It is placed near the connector or near important circuit which consume much power. In general, USB cable is longer than local traces in the circuit, so it is recommended to put near the USB connector.
Title: Re: The Living PCB Design Thread
Post by: Eszett on Sun, 20 November 2016, 05:15:19
hanya thanks for the explanation. However I never saw this type of capacitor before in keyboard PCBs, I guess it's rare because not really necessary?
Title: Re: The Living PCB Design Thread
Post by: hanya on Sun, 20 November 2016, 10:10:42
If you have large capacitor placed near the circuit, it might enough to make the power stable. Most MCU specification recommends large capacitor (like 1-4.7 uF) and decoupling capacitor.
If you have regulator to change power voltage on your circuit, it needs some capacitor to make power source stable. The capacitor works like a tank to store some power from USB cable.
Most keyboard matrix does not consume large current, so we might not need it.
Some MCU which consume much current needs such care. It seems EPS32 modules needs 204mA at start up and it does not work with simple USB connection.
Title: Re: The Living PCB Design Thread
Post by: deadall127 on Sun, 20 November 2016, 15:39:13
it is just a matter of choice, you prefer a keyboard with a beautiful gold finished PCB or a hand-wired one?
or would you prefer $400 mechanical switches or some kind of $5 ****ty keyboard?
it's the same for decoupling and bulk capacitors, it works without it but it's not professional, not beautiful ;)
Title: Re: The Living PCB Design Thread
Post by: Eszett on Sun, 20 November 2016, 21:43:41
Quote
It seems EPS32 modules needs 204mA at start up and it does not work with simple USB connection.
Alright, but I still don't understand why it has to be placed close to the USB connector? Could be placed anywhere else, no?
Title: Re: The Living PCB Design Thread
Post by: deadall127 on Mon, 21 November 2016, 09:32:49
Quote
Alright, but I still don't understand why it has to be placed close to the USB connector? Could be placed anywhere else, no?

yeah, bulk capacitors haven't to be close to the power input as decoupling ones have to be closest as possible to the device powered
Title: Re: The Living PCB Design Thread
Post by: tee-eye on Tue, 22 November 2016, 01:15:40
Hey yall.
So I am starting on my first full PCB design.
I was originally going to spend the time and look at putting an atmega 32u4 right on the board but for now, I am just going to design one that uses the teensy LC.
can anyone take a look at my schematic and see if anything looks wrong?
[attach=1]

thank you all..
I am basically taking a keycool 84 layout but seperating the function row from the numbers.
Title: Re: The Living PCB Design Thread
Post by: Eszett on Tue, 22 November 2016, 01:38:33
@deadall Ye, right.
Title: Re: The Living PCB Design Thread
Post by: deadall127 on Thu, 24 November 2016, 02:35:10
Hey yall.
So I am starting on my first full PCB design.
I was originally going to spend the time and look at putting an atmega 32u4 right on the board but for now, I am just going to design one that uses the teensy LC.
can anyone take a look at my schematic and see if anything looks wrong?
(Attachment Link)

thank you all..
I am basically taking a keycool 84 layout but seperating the function row from the numbers.

there is some strange things, (wire on other wire) but I'm waiting for the pcb routing before I can tell if there is something wrong ;)
and I don't know the pinout of the teensy...
Title: Re: The Living PCB Design Thread
Post by: tee-eye on Thu, 24 November 2016, 14:13:17
Well good news
I actually scrapped that one
I was trying out eagle and decided didn't like it.
So I restarted in ki cad and am much more comfortable so I'll be posting again soon
Title: Re: The Living PCB Design Thread
Post by: dantan on Mon, 28 November 2016, 11:04:59
I had a question about bridging traces on a PCB. I posted it here https://geekhack.org/index.php?topic=86066.0

Hope to get some help. I don't understand how come a PCB has traces that skip alternate keys.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sun, 11 December 2016, 15:26:47
I need some noob questions answered.

1. In universal PCBs, duplicated keys (such as on-center and stepped Caps lock) share the same diode. Is that enough for the firmware (namely TMK) to consider them as one key alone or do I need something else to avoid overcrowding the matrix?
2. I'm using a Teensy 2.0 and, by looking at the firmware, looks like each LED indicator requires a dedicated pad on the controller, is that correct?
3. How do I actually connect the LEDs? I assume anodes go to controller pads, but what about the cathodes?
4. I'll be using 2x3x4 mm LEDs, green and reds which are rated for 2.2V. I calculated the resistance needed on this website (http://ledcalc.com/) and it reads 150 Ohms. Is that correct?

Thanks.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 12 December 2016, 02:17:03
1. Well obviously don't populate more than one switch per diode.
2. How else do you plan to control them separately? You can do that matrix style as well. Or with extra chips, like expanders or shift registers.
3. It's commonly done the other way around, cathode to controller. I think that is more of historical reasons where chips had greater capacity to sink than source current. The Teensy should have symmetric sink/source capabilities according to the datasheet.
4. Totally depends on the current you want. If you are running at 5V and you want the LED to drop 2.2V you need to drop 2.8V over the resistor. After that apply Ohm's law and get the required resistance. With 150Ω you get 2.8V/150Ω=~20mA. That's probably going to be blinding, but within spec for the LED. If you use controller pins with PWM for the LEDs you can adjust the intensity (duty cycle) for them through software. Another reason to use dedicated IO pins for LEDs rather than expansions.

There, perhaps that came out in a harsh tone. If so it wasn't on purpose. I like to help =)

"If you never ask you won't have any answers"
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Mon, 12 December 2016, 07:07:53
1. Well obviously don't populate more than one switch per diode.
So it just takes to connect them electrically and populate the matrix as if the secondary key isn't there. Correct?

You can do that matrix style as well.
Interesting, but since I have enough pads on my controller, I'll go for indivual connections for the time being.

Or with extra chips, like expanders or shift registers.
That's way beyond my electronics knowledge. I'm no engineer but a mere hobbist.

3. It's commonly done the other way around, cathode to controller. I think that is more of historical reasons where chips had greater capacity to sink than source current. The Teensy should have symmetric sink/source capabilities according to the datasheet.
By the looks of your statement, I guess it's safe to connect pad to anode then, but I'll follow your suggestion and go for the cathode. It's still unclear to me where to connect the other end of the LED.

4. Totally depends on the current you want. If you are running at 5V and you want the LED to drop 2.2V you need to drop 2.8V over the resistor. After that apply Ohm's law and get the required resistance. With 150Ω you get 2.8V/150Ω=~20mA. That's probably going to be blinding, but within spec for the LED. If you use controller pins with PWM for the LEDs you can adjust the intensity (duty cycle) for them through software. Another reason to use dedicated IO pins for LEDs rather than expansions.
Good, because I don't know where to start with expansions. The LEDs I have are rated for 20 mAh and they are going beneath a windowed cap anyway, so I guess I should be safe with that.

There, perhaps that came out in a harsh tone. If so it wasn't on purpose. I like to help =)

"If you never ask you won't have any answers"
Actually your tone sounded more like straightforward than harsh and I do appreciate your patience, explainations and the time you're wasting for me.
Title: Re: The Living PCB Design Thread
Post by: pomk on Mon, 12 December 2016, 07:25:51
4. Totally depends on the current you want. If you are running at 5V and you want the LED to drop 2.2V you need to drop 2.8V over the resistor. After that apply Ohm's law and get the required resistance. With 150Ω you get 2.8V/150Ω=~20mA. That's probably going to be blinding, but within spec for the LED. If you use controller pins with PWM for the LEDs you can adjust the intensity (duty cycle) for them through software. Another reason to use dedicated IO pins for LEDs rather than expansions.
Good, because I don't know where to start with expansions. The LEDs I have are rated for 20 mAh and they are going beneath a windowed cap anyway, so I guess I should be safe with that.
I would suggest going for a 500-1000Ω resistor. The 20mA is likely the maximum the LED can withstand, and a lower current will give your LEDs better life expectancy. Also, the LED is going to be blinding. For example VE-A went with 1k if I remember correctly. PWM is also an option to make it less blinding, as bpiphany already suggested.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Mon, 12 December 2016, 07:39:17
I would suggest going for a 500-1000Ω resistor. The 20mA is likely the maximum the LED can withstand, and a lower current will give your LEDs better life expectancy. Also, the LED is going to be blinding. For example VE-A went with 1k if I remember correctly. PWM is also an option to make it less blinding, as bpiphany already suggested.
Noted. Much obliged.
Title: Re: The Living PCB Design Thread
Post by: pomk on Mon, 12 December 2016, 08:19:52
The other pin one the LED goes to ground or VCC, depending on the orientation of the LED. Ie. if the anode is connected to the MCU, the cathode is connected to ground, and if the cathode is connected to MCU, you should connect the anode to VCC.
Title: Re: The Living PCB Design Thread
Post by: menuhin on Mon, 12 December 2016, 08:48:13
Where is a good source to get a PCB made in Europe? Like ExpressPCB or EasyEDA.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Mon, 12 December 2016, 09:01:35
The other pin one the LED goes to ground or VCC, depending on the orientation of the LED. Ie. if the anode is connected to the MCU, the cathode is connected to ground, and if the cathode is connected to MCU, you should connect the anode to VCC.
I was missing this very difference. Thank you very much.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 14 December 2016, 16:33:18
Can I put indicators' LEDs in the switch matrix like this?

Also, this is going to be connected to a teensy 2.0; does it look ok to you?

(click to enlarge)
(http://i.imgur.com/p4aP6wV.png)
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Thu, 15 December 2016, 00:36:40
LEDs and resistors go in series. One end of the resistor connects to one end of the LED. Nothing in between and nothing more connected there.

Other than that it may actually work. You'll have a more interesting firmware to write, and you really should test that out in a breadboard or something. The LEDs won't be on while you're scanning the matrix. That is a very small percentage of the time, so that won't matter much.

Do you intend to use Those BKSP and JIS keys toghether? They are in the same row/col and would be mutually exclusive. If they are two different mounting options for the same key you don't need the extra diode, just put the switches in parallel. (Unless, of course, you are using switches with built in diodes.)


Edit: Actually since you're only using one row for the LEDs anyway. If this works, and I believe it should (test it), you could reuse the Col,4,5,6-pins for the LEDs, and simply connect the cathodes directly to GND. If you were utilizing more parts of the matrix for LEDs you'd need to multiplex them by use of the Row-pins.

The way it would work is you have three states for the Col-pins. When the LED is turned off the pin is tri-stated (removed from the circuit). To turn the LED on you drive the pin high. And when you scan that particular Col-pin you drive it low (which also turns the LED off).

In a matrix like this with more LEDs, using Row-pins for the cathodes, you'd switch the Row-pin from pull-up input to output low to activate the LEDs in that row.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 15 December 2016, 03:40:09
Do you intend to use Those BKSP and JIS keys toghether? They are in the same row/col and would be mutually exclusive. If they are two different mounting options for the same key you don't need the extra diode, just put the switches in parallel. (Unless, of course, you are using switches with built in diodes.)
Yes, I'm splitting the 2u Backspace into two 1u keys (JIS is one), so I'd better be moving BSKP to Row 0:Col 13 then.

The LEDs won't be on while you're scanning the matrix. That is a very small percentage of the time, so that won't matter much.
So they basically turn off everytime I press a key? That's gonna be weird.

LEDs and resistors go in series. One end of the resistor connects to one end of the LED. Nothing in between and nothing more connected there.

Other than that it may actually work. You'll have a more interesting firmware to write, and you really should test that out in a breadboard or something.

Edit: Actually since you're only using one row for the LEDs anyway. If this works, and I believe it should (test it), you could reuse the Col,4,5,6-pins for the LEDs, and simply connect the cathodes directly to GND. If you were utilizing more parts of the matrix for LEDs you'd need to multiplex them by use of the Row-pins.

The way it would work is you have three states for the Col-pins. When the LED is turned off the pin is tri-stated (removed from the circuit). To turn the LED on you drive the pin high. And when you scan that particular Col-pin you drive it low (which also turns the LED off).

In a matrix like this with more LEDs, using Row-pins for the cathodes, you'd switch the Row-pin from pull-up input to output low to activate the LEDs in that row.
What if I move the LEDs to totally new row? If they are going to, say, Row 6:Col 0, 1 and 2, will I still be experiencing what stated before?
I can wire each LED to a dedicated Teensy pad, I have room, but I'd like to understand how to put indicators in a matrix anyway (if it's even possible).
A breadboard is on its way to me. I'll run some tests as soon as I get my hands on it.

Once again, thank you very much.
Title: Re: The Living PCB Design Thread
Post by: vvp on Thu, 15 December 2016, 04:15:46
The LEDs won't be on while you're scanning the matrix. That is a very small percentage of the time, so that won't matter much.
So they basically turn off everytime I press a key? That's gonna be weird.
That is not weird. This allows you to share row xor column wires for both key matrix scanning and LED brightness control. The LEDs will be blinking but you are scanning keyboard with frequency of at least 200 Hz (which is on the low side for a matrix scanning). You will not see the blinking no matter how good your eyes are.
Actually, my current keyboard has a light sensor which adjusts LED brightness based on the illuminance. The brightness is controlled using PWM. So my status LEDs are already blinking at about 250 Hz.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 15 December 2016, 04:20:43
The LEDs won't be on while you're scanning the matrix. That is a very small percentage of the time, so that won't matter much.
So they basically turn off everytime I press a key? That's gonna be weird.
That is not weird. This allows you to share row xor column wires for both key matrix scanning and LED brightness control. The LEDs will be blinking but you are scanning keyboard with frequency of at least 200 Hz (which is on the low side for a matrix scanning). You will not see the blinking no matter how good your eyes are.
That makes it much better. Thank you fine sir.

my current keyboard has a light sensor which adjusts LED brightness based on the illuminance.
Witchcraft.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Thu, 15 December 2016, 06:37:10
Yeah, move BKSP to Row0.

You have plenty of pins on the Teensy. Personally I would use separate pins for each LED. It just make things easier. If you had a whole matrix of keys it would be a different matter. I don't know where you intend to place the LEDs physically in relation to the Teensy, but wiring them up to the bottom row may just be cumbersome anyhow.

We had some thought experiment way back on how to double purpose the matrix for full individual back lighting. Although probably possible, I don't think that led anywhere...
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 15 December 2016, 07:22:54
Yeah, move BKSP to Row0.

I would use separate pins for each LED.
Done.

Is this mess gonna work?
(http://i.imgur.com/AlRPG4o.png)
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Thu, 15 December 2016, 07:51:13
Sure should, but I would move the LEDs to PB5,6,7. Then you will have them on OC1A,B,C which are the compare output pins for timer 1 interrupts. That way you can "effortlessly" PWM them, when you get to that skill level ;)
Title: Re: The Living PCB Design Thread
Post by: vvp on Thu, 15 December 2016, 08:03:37
We had some thought experiment way back on how to double purpose the matrix for full individual back lighting. Although probably possible, I don't think that led anywhere...
Something like this should work. May be the row selection block needs to be a bit more complicated if common 5V tolerant pins are not also tolerant in output mode. My guess is that they are but I'm not sure.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 15 December 2016, 08:45:02
Sure should, but I would move the LEDs to PB5,6,7. Then you will have them on OC1A,B,C which are the compare output pins for timer 1 interrupts. That way you can "effortlessly" PWM them, when you get to that skill level ;)
Whoa, amazing. I love that you're saying when rather than if ever.
Thanks a bunch.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Thu, 15 December 2016, 08:55:30
I would aim to use the same matrix for connecting both switches LEDs if possible. I don't remember which transistors are capable of what and which way around they work... But something like this would perhaps work.

I don't know if the row pins will be pulled low enough with two diode drops. But configured with pull-up resistors they should shut off the transistor and scan the matrix. If they are switched to low outputs they can sink the row of LEDs through the transistor. The diode protects the input pin from the LED current.

The column pins work like before with tri-stating.

I really don't know. I just had the idea =)

[attach=1]
Title: Re: The Living PCB Design Thread
Post by: deadall127 on Fri, 16 December 2016, 00:04:13
Where is a good source to get a PCB made in Europe? Like ExpressPCB or EasyEDA.

pcbshopper.com (http://pcbshopper.com) is a price comparator, easyEDA is often the best
Title: Re: The Living PCB Design Thread
Post by: deadall127 on Fri, 16 December 2016, 00:16:04
I would aim to use the same matrix for connecting both switches LEDs if possible. I don't remember which transistors are capable of what and which way around they work... But something like this would perhaps work.

I don't know if the row pins will be pulled low enough with two diode drops. But configured with pull-up resistors they should shut off the transistor and scan the matrix. If they are switched to low outputs they can sink the row of LEDs through the transistor. The diode protects the input pin from the LED current.

The column pins work like before with tri-stating.

I really don't know. I just had the idea =)

(Attachment Link)

one resistor per switch? heavy...

I'll post my RGB scheme later
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Fri, 16 December 2016, 02:49:37
one resistor per switch? heavy...

Well, that was quick and dirty =D So just move them to one per column. The switch circuit shouldn't care too much about that.
Title: Re: The Living PCB Design Thread
Post by: vvp on Fri, 16 December 2016, 05:12:30
It could work if you select low forward voltage diodes for rows (D5,...) and matrix scanning (D3,...) and high forward voltage LEDs. If there is a key pressed then there will be color bleed from a LED which should should be lit to some other LEDs. May be it will not be noticeable. It will be sensitive to part selection.

You should satisfy these inequalities with as good margin as  possible so that it works even with key switches which are not perfect and diodes which forward voltage varies a bit from part to part.
Ufd + Ufk < 0.3*Vcc
Ufd + Ufl  + 2*Ufk > 0.7*Vcc
Ufl + Ut < Vcc
2*Ufl + Ufk + Ut > Vcc

Ufd - forward voltage drop on row diode
Ufk - forward voltage drop on key diode
Ufl - forward voltage drop on LED
Ut - voltage drop on open transistor

Lets consider this as a test:
Ufd = 0.3 V
Ufk = 0.3 V
Ufl = 2.1 V
Ut = 0.2 V
Vcc = 3.3 V

We get:
0.6 < 0.99
3.0 > 2.3
2.3 < 3.3
4.7 > 3.3

Looks like margins are usable. But this would require expensive schottky diodes. Also one must be careful about this inequality: Ufd + Ufl  + 2*Ufk > 0.7*Vcc
Diodes allow forward current even below forward voltage so the pull down resistor on the columns must be small emough to raise the diodes forward voltage to high enough values. E.g. an orange diode can have forward voltage of 2.1V but at 20 mA. Our example inequality for this was 3.0>2.3. If we use lower current of 1 mA  for the orange diode then its forward voltage drops to 1.8 V and our safety margin of 0.7 drops to 0.4 V. Not that bad but internal MCU pull down will not give you 1 mA but only few  µA when the dioeds are considered. The LED specification does not even tell what forward voltage will be at this low current. So we need to use external pull downs of about 3.3 kΩ to be really safe. That makes things more complicated.

Well, to tell the truth I would rather simulate this in spice before even trying to built it on a bread board. It looks like it may work but margins are low for my liking. Also the schematic may get more complicated since MCU pull downs may not be good enough. I think I'll rather stay with a separate wires for lines xor cols in the matrix to be on the safe side. That is rather simple solution considering all things overall.

Putting the resistor on the lines is better.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Fri, 16 December 2016, 05:45:37
Ok, so. My reasoning went like this:

Forward voltage of diode ≃ 0.6V, times 2 that is 1.2, which is smaller than 0.3×5V=1.5V, so that's a bit on the margin.

The part that always confuses me is transistors. I would like them to work like this:

1. All row pins are normally inputs with pull-up resistors activated. The ATmegas source current in this mode, and I hope that will close the transistors for all rows.
2. All column pins are normally tri-stated. No current passes either in or out.
3. To scan a column, that one column is pulled low, rows are read and the column tri-stated again.
4. To light up selected LEDs of a row, the corresponding columns are driven high, and the row pin is driven low to open the transistor of that row alone.

I now see how in 4. when the upper LED row is activated, current can pass through L1, S2, D2, L4 even when neither L1 nor L4 should be lit. So, yeah, my idea falls on that =P

Trixy, that ghosting is =)
Title: Re: The Living PCB Design Thread
Post by: vvp on Fri, 16 December 2016, 06:38:44
Don't take me wrong. I think it actually may work well. The only problems are that it is sensitive to part selection and it may (or maybe it will not) require external pull ups/downs because the ones in MCU may be too weak. If you are feeling advantageous make a spice simulation. It is not hard. You can use qucs (http://qucs.sourceforge.net/) or even kicad allows to export a spice code. The tools are free but the time spent with it will be considerable (if you do not already do this often).

I though you read columns and power rows when scanning the key matrix. But I guess that making it the opposite way will not change the nature of inequalities.

I kind of like the idea of using a simple LED driver(*) and not needing to care about LED forward voltage and resistors. Want a different LED? Maybe a LEDs with different color? Just swap it with any LED which has forward voltage less than 5V. No need to be careful about it. The problem is that I do not have an idea how to share both rows and cols with a LED driver.

(*) especially when the simple LED drivers can cost less than 1 €
Title: Re: The Living PCB Design Thread
Post by: deadall127 on Sun, 18 December 2016, 06:41:41
so, here's a 2*2 simplification of my keyboard matrix:

(http://i.imgur.com/WO57Z95.png)

left => led state input
down => column selection
right => output with pull-up res

/!\ works only with 5V controllers (PIC, ATmega etc...) /!\
Title: Re: The Living PCB Design Thread
Post by: nonah on Sun, 18 December 2016, 18:25:32
Does anyone know why they have wired PB4 to Vcc on the ergodox? Referencing this diagram:  https://github.com/benblazak/ergodox-firmware/blob/master/src/keyboard/ergodox/circuit-diagram.svg (https://github.com/benblazak/ergodox-firmware/blob/master/src/keyboard/ergodox/circuit-diagram.svg),
 and this schematic: https://github.com/ErgoDox-EZ/docs/blob/master/ErgoDox%20EZ%20Schematic.pdf (https://github.com/ErgoDox-EZ/docs/blob/master/ErgoDox%20EZ%20Schematic.pdf).

In https://github.com/jackhumbert/qmk_firmware/blob/master/keyboards/ergodox/ez/ez.c (https://github.com/jackhumbert/qmk_firmware/blob/master/keyboards/ergodox/ez/ez.c), they cite the reason being "hardware convenience", whatever that means.

And this documentation: https://github.com/benblazak/ergodox-firmware/blob/master/src/keyboard/ergodox/controller/teensy-2-0.md (https://github.com/benblazak/ergodox-firmware/blob/master/src/keyboard/ergodox/controller/teensy-2-0.md), doesn't shed any light on the matter.

I'm quite confused, it seems rather strange. No chance any of you guys know?  ;)
Title: Re: The Living PCB Design Thread
Post by: hasu on Sun, 18 December 2016, 20:24:30
See KiCad PCB file here, https://github.com/Ergodox-io/ErgoDox
Ergodox shares one PCB desgin for both left and right and one pcb has Teensy and another has MCP23018 IO expander. And footprint of the two chips are overlaped each other to share traces of matrix.

(http://i.imgur.com/bYYNGcN.png)
where 11 of MCP23018 is Vdd and  28 of Teensy2.0 is PB4.

This weirdness is needed to feed power to Vdd pin of MCP23018, PB4 is sacrificed just because it shares same position as  the Vdd pin.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 19 December 2016, 03:37:09
The deeper reason why there is a track going from pin 11 on the expander to pin 20 of the Teensy is to be able to put a bypass capacitor there. Pin 18 of the Teensy really shouldn't be connected to GND either. That is also why I put those solder jumpers there. To make it possible to connect/disconnect them from the Teensy.
Title: Re: The Living PCB Design Thread
Post by: nonah on Mon, 19 December 2016, 05:17:13
Ah, thanks a lot guys, that's a pretty brilliant design.

Edit: why is PB4 set to input with its internal pull up resistor disabled in the firmware?
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 19 December 2016, 09:10:09
Edit: why is PB4 set to input with its internal pull up resistor disabled in the firmware?

That is how you tri-state a pin. It could have had the pull-up activated, but that would draw some (very small) current for no good reason. The VCC solder jumper is connected per default, and it would be pretty bad to set PB4 as a low output. So staying as far away from that as possible =)
Title: Re: The Living PCB Design Thread
Post by: nonah on Mon, 19 December 2016, 11:20:51
Edit: why is PB4 set to input with its internal pull up resistor disabled in the firmware?

That is how you tri-state a pin. It could have had the pull-up activated, but that would draw some (very small) current for no good reason. The VCC solder jumper is connected per default, and it would be pretty bad to set PB4 as a low output. So staying as far away from that as possible =)

Thanks, makes sense :thumb:
Title: Re: The Living PCB Design Thread
Post by: kolec94 on Mon, 19 December 2016, 15:36:57
Anyone have experience with a mbi5042gp led controller?
Title: Re: The Living PCB Design Thread
Post by: hasu on Mon, 19 December 2016, 17:04:20
Thanks for the explanation, bpiphany.
I didn't find the bypass capacitor thing at point of wrting my post. So users have to close on GND solder jumper(default open) to add the capacitor to IO expander. And cutting the VCC solder jumper(closed by default) is optional but safer for Teensy side. Makes sense. I hope users could get good assembly guide :D

Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 21 December 2016, 08:47:02
Wouldn't that be about time ;) But, really, is anyone still using this archaic design?..

It was a bit unclear at the time if a by-pass should be needed. I suppose the more educated answer is that they should always be used. I don't really remember the justifications for keeping one solder jumper open and the other closed. Stuff probably work with the GND open, and certainly not without the VCC closed, I suppose..
Title: Re: The Living PCB Design Thread
Post by: climbalima on Tue, 27 December 2016, 21:45:01
Im having trouble with a custom pcb I did. The reset button is not functioning. I was able to get the first flash done, but needed to make changes to the firmware. When I push the reset button the device disconnects, but reconnects as the keyboard without going into bootloader mode. This is not my first board with a 32u4, but the first that I have had this issue with. Here is a picture of the schematic

(http://i.imgur.com/KTvwoSK.jpg)
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 28 December 2016, 07:55:33
More questions for you gentlemen.

First, would you please check if my schematic would work?
(http://i.imgur.com/cVKXcBv.png)

Particularly: I've read I need a pull-up resistor on the reset switch and, by looking at the Teensy's schematic, it's placed between ground and PE2 which works as Hardware Bootloader Activator. Will this work or I have to move the resistor to the reset switch directly? The datasheet reads that PE2 (HWB) has an internal pull-up resistor, isn't that enough for the purpose?

Secondly: The AREF pin is, as for the datasheet, the analog reference pin (input) for the A/D Converter. Since I'm very unlikely to do any analog-digital conversion, is it safe to leave it unconnected?

Lastly: the Satan GH60, which is unless I'm wrong a rebrand of the GH60 rev. A, mounts a ME9926 triode transistor that, to my understanding, is used for backlighting. Since I'm not using such feature, am I safe to assume that I can leave it out of the PCB?

Thanks.
Title: Re: The Living PCB Design Thread
Post by: monkeyplusplus on Wed, 28 December 2016, 12:35:33
To answer just your last question, the first design I did don't have any LEDs, so I left out the transistor (and everything else of course) to control them. It worked fine :)
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 28 December 2016, 12:40:33
To answer just your last question, the first design I did don't have any LEDs, so I left out the transistor (and everything else of course) to control them. It worked fine :)
The confirmation I needed. Thank you.
Title: Re: The Living PCB Design Thread
Post by: climbalima on Wed, 28 December 2016, 13:53:56
More questions for you gentlemen.

First, would you please check if my schematic would work?
Show Image
(http://i.imgur.com/cVKXcBv.png)


Particularly: I've read I need a pull-up resistor on the reset switch and, by looking at the Teensy's schematic, it's placed between ground and PE2 which works as Hardware Bootloader Activator. Will this work or I have to move the resistor to the reset switch directly? The datasheet reads that PE2 (HWB) has an internal pull-up resistor, isn't that enough for the purpose?

Secondly: The AREF pin is, as for the datasheet, the analog reference pin (input) for the A/D Converter. Since I'm very unlikely to do any analog-digital conversion, is it safe to leave it unconnected?

Lastly: the Satan GH60, which is unless I'm wrong a rebrand of the GH60 rev. A, mounts a ME9926 triode transistor that, to my understanding, is used for backlighting. Since I'm not using such feature, am I safe to assume that I can leave it out of the PCB?

Thanks.

Just a note on your decoupling. The VCC pins can all be connected to VCC, but then the caps go to ground. You have all the VCC pins going through a capacitor before going to the voltage rail. Strange stuff may happen with this.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 28 December 2016, 14:16:32
Just a note on your decoupling. The VCC pins can all be connected to VCC, but then the caps go to ground. You have all the VCC pins going through a capacitor before going to the voltage rail. Strange stuff may happen with this.
Thanks sir, does it look any better now?

(http://i.imgur.com/sg8r8yc.png)
Title: Re: The Living PCB Design Thread
Post by: climbalima on Wed, 28 December 2016, 15:10:52
Thanks sir, does it look any better now?

Show Image
(http://i.imgur.com/sg8r8yc.png)


Yup, but I have the UCAP go to ground and UVCC and VBUS go to the voltage rail.
Title: Re: The Living PCB Design Thread
Post by: Eszett on Wed, 28 December 2016, 15:22:39
Hi guys! I have a question. Here is my ISO-enter footprint. According to all the other sources I inspected so far, the keyswitch footprint is rotated 90 degrees. Why?
[attach=1]

Would there be any downside (which downside?) if I have it unrotated, as all the other keyswitch footprints, like this? ...
[attach=2]
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 28 December 2016, 15:26:50
the keyswitch footprint is rotated 90 degrees. Why?
To allow the usage of Costar stabilizer. I assume it applies to any vertical key, namely numpad plus and enter.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 28 December 2016, 15:28:49
I have the UCAP go to ground and UVCC and VBUS go to the voltage rail.
Like this?
(http://i.imgur.com/ORaX4bE.png)
Title: Re: The Living PCB Design Thread
Post by: Eszett on Wed, 28 December 2016, 15:38:09
@TalkingTree. Ah... do I understand it right: otherwise, the Costar wire would collide with the keyswitch house? In this area here I marked red... [attachimg=1]
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 28 December 2016, 15:49:19
do I understand it right: otherwise, the Costar wire would collide with the keyswitch house? In this area here I marked red... (Attachment Link)
I don't have any evidence but I'm pretty much sure that you described the issue perfectly. Also, I believe one can't use in-switch LEDs with Costar stabilizers or, perhaps, 2x3x4mm ones.
Title: Re: The Living PCB Design Thread
Post by: Eszett on Wed, 28 December 2016, 15:50:31
Thanks TalkingTree. I'll better leave it rotated then.
Title: Re: The Living PCB Design Thread
Post by: climbalima on Wed, 28 December 2016, 16:38:23
I have the UCAP go to ground and UVCC and VBUS go to the voltage rail.
Like this?
Show Image
(http://i.imgur.com/ORaX4bE.png)


Yup, but include the decoupling caps for them too.
Title: Re: The Living PCB Design Thread
Post by: Eszett on Wed, 28 December 2016, 17:03:29
The VBUS pin at the Atmega32u4 is just a monitor pin, not sure if it really needs a decoupling cap? Instead, it might be reasonable to add one bulk capacitor with a larger value, e.g. 2.2µF, no? I have it like this: 0.1µF decoupling capacitor at Pin_2, Pin_14, Pin_24, Pin_34, and Pin_44. Plus, one 2.2µF decoupling capacitor for those pins in common. And, the 1µF cap on UCAP is mandatory. On the other hand, the Atmega is pretty robust, I've heard it tends to work even when you're merely using 4 decoupling caps. Depends all on your environment tho..
Title: Re: The Living PCB Design Thread
Post by: kolec94 on Thu, 29 December 2016, 11:11:53
anyone know how to do sdo and sdi with a atmega32u4?
Title: Re: The Living PCB Design Thread
Post by: vvp on Thu, 29 December 2016, 13:34:51
Just connect the pins like this:
(https://upload.wikimedia.org/wikipedia/commons/thumb/e/ed/SPI_single_slave.svg/350px-SPI_single_slave.svg.png)
Just a direct connection between pins. No pull-ups/downs / capacitors etc are needed. Your MCU is going to be a master. A slave can be e.g. an EEPROM.
Here (https://github.com/hercek/keyboard-firmware/blob/katy/storage/spi_eeprom.c) is an example code which handles SPI EEPROM. Just follow the compilation branches for ARCH_AVR8. EDIT: That is a simple approach using polling. ATmega does not support DMA but it supports IRQ on transfer completion so you can get a bit fancier if you need to save clock cycles for parallel tasks.
Title: Re: The Living PCB Design Thread
Post by: swill on Mon, 02 January 2017, 17:44:37
Hey all.  I am new to this thread. I have not touched anything on the electrical side of building keyboards, and have only built boards based on PCBs designed by others.

I am the developer behind http://builder.swillkb.com (http://builder.swillkb.com).  Ironically, I started it because I was not confident in my cad skills and thought I should automate the plate layout.  Now it does quite a bit more than I was expecting when I started, but I have always had the pipe dream of being able to produce a PCB that goes with the layout specified.

The biggest hurdle I think I am going to have with this is the auto routing for the pcb.  I am only just starting to look into what I would need to do to even get something primitive built.

So my question is. What algorithms should I be researching, and what auto routing systems are best suited to designing keyboards. I know the following exist, but not much beyond that.

Maze router,
Line probe router,
Channel router,
Area routers,
Switchbox routing

Given my current skill level, I will probably have to spend a couple months just learning stuff. I would not expect to actually have anything written for about 6 months and really, who knows at that point.

If anyone has resources you can share that you think would be required reading for me, please share a link. If you have ideas or suggestions, please let me know as well.

Thanks for the help everyone. Happy new year. If you have not checked out the builder recently, you guys may be interested in the new custom polygon features I finally finished adding to the builder over the holidays.

Title: Re: The Living PCB Design Thread
Post by: kolec94 on Mon, 02 January 2017, 19:16:02
Hey all.  I am new to this thread. I have not touched anything on the electrical side of building keyboards, and have only built boards based on PCBs designed by others.

I am the developer behind http://builder.swillkb.com (http://builder.swillkb.com).  Ironically, I started it because I was not confident in my cad skills and thought I should automate the plate layout.  Now it does quite a bit more than I was expecting when I started, but I have always had the pipe dream of being able to produce a PCB that goes with the layout specified.

The biggest hurdle I think I am going to have with this is the auto routing for the pcb.  I am only just starting to look into what I would need to do to even get something primitive built.

So my question is. What algorithms should I be researching, and what auto routing systems are best suited to designing keyboards. I know the following exist, but not much beyond that.

Maze router,
Line probe router,
Channel router,
Area routers,
Switchbox routing

Given my current skill level, I will probably have to spend a couple months just learning stuff. I would not expect to actually have anything written for about 6 months and really, who knows at that point.

If anyone has resources you can share that you think would be required reading for me, please share a link. If you have ideas or suggestions, please let me know as well.

Thanks for the help everyone. Happy new year. If you have not checked out the builder recently, you guys may be interested in the new custom polygon features I finally finished adding to the builder over the holidays.
ok so what are you going to use as a controller diodes and other components?
do you have pcb models for different switch types?
led holes?
Title: Re: The Living PCB Design Thread
Post by: swill on Mon, 02 January 2017, 21:36:18
Hey all.  I am new to this thread. I have not touched anything on the electrical side of building keyboards, and have only built boards based on PCBs designed by others.

I am the developer behind http://builder.swillkb.com (http://builder.swillkb.com).  Ironically, I started it because I was not confident in my cad skills and thought I should automate the plate layout.  Now it does quite a bit more than I was expecting when I started, but I have always had the pipe dream of being able to produce a PCB that goes with the layout specified.

The biggest hurdle I think I am going to have with this is the auto routing for the pcb.  I am only just starting to look into what I would need to do to even get something primitive built.

So my question is. What algorithms should I be researching, and what auto routing systems are best suited to designing keyboards. I know the following exist, but not much beyond that.

Maze router,
Line probe router,
Channel router,
Area routers,
Switchbox routing

Given my current skill level, I will probably have to spend a couple months just learning stuff. I would not expect to actually have anything written for about 6 months and really, who knows at that point.

If anyone has resources you can share that you think would be required reading for me, please share a link. If you have ideas or suggestions, please let me know as well.

Thanks for the help everyone. Happy new year. If you have not checked out the builder recently, you guys may be interested in the new custom polygon features I finally finished adding to the builder over the holidays.
ok so what are you going to use as a controller diodes and other components?
do you have pcb models for different switch types?
led holes?

So right now I don't have anything, but I do have an idea of the things I will need.  I don't have modules built yet for switch and led layouts.  I will likely do SMD diodes and resistors (for LEDs, when I support them).  Ideally, I would build a standard footprint I use for every switch and use it everywhere.  That will make things easier from the dev side.  I have not talked to MOZ or Melvang about this yet, but I basically want to use something like a simplified Enabler PCB as the base switch component.  I know through hole is less daunting for builders, but I think most people are capable of soldering SMD (I was without much practice).  I think it is probably important to support SMD because it makes it easier to automate pick and place of components.  If people end up running small group buys based on the output, I think it gets us one step closer to a fully automated process.

The controller is a bit of a different story.  I would ideally like to give people options, but I have to start somewhere.  The ones that are on my radar would be something like; the SMD footprint for an ATMEGA32U4 (or similar), through hole pin set for the teensy (or similar).

My goal is to help enable builders and people with ideas to make it happen, so I am trying to solve the lowest common denominator with the most value to start with.  Then we go from there... 

To me, the auto routing is the biggest blind spot for me.  I know it is possible, but I also know it is non-trivial, so I have to get comfortable with how I am going to solve that before I get to deep into the weeds on some of the other pieces.  With the builder right now, I have the capability to draw vector files (svg+) and I already have the location of all the switches.  It would not be hard for me to start with a drill hole output, or even draw essentially the enabler at every switch location and just not route it.  Obviously not an end game solution, but it is a start.  It gets me to the point of being able to produce something of value.  With that as a starting point, I may be able to output as KiCad and people could manually route the pcb. 

Anyway, this is longer than I was planning to write.  There is a lot of ground I have to cover before I get to an end game solution, but I think there is probably a lot of value in some of the baby steps.  :)
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Tue, 03 January 2017, 00:30:57
One board to rule them all, routed and ready for any occasion ;)
https://geekhack.org/index.php?topic=38414.msg757373#msg757373
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Tue, 03 January 2017, 00:31:14
double post
Title: Re: The Living PCB Design Thread
Post by: jrmobley on Tue, 03 January 2017, 04:06:21
Hey all.  I am new to this thread. I have not touched anything on the electrical side of building keyboards, and have only built boards based on PCBs designed by others.

I am the developer behind http://builder.swillkb.com (http://builder.swillkb.com).  Ironically, I started it because I was not confident in my cad skills and thought I should automate the plate layout.  Now it does quite a bit more than I was expecting when I started, but I have always had the pipe dream of being able to produce a PCB that goes with the layout specified.

The biggest hurdle I think I am going to have with this is the auto routing for the pcb.  I am only just starting to look into what I would need to do to even get something primitive built.

So my question is. What algorithms should I be researching, and what auto routing systems are best suited to designing keyboards. I know the following exist, but not much beyond that.

Maze router,
Line probe router,
Channel router,
Area routers,
Switchbox routing

Given my current skill level, I will probably have to spend a couple months just learning stuff. I would not expect to actually have anything written for about 6 months and really, who knows at that point.

If anyone has resources you can share that you think would be required reading for me, please share a link. If you have ideas or suggestions, please let me know as well.

Thanks for the help everyone. Happy new year. If you have not checked out the builder recently, you guys may be interested in the new custom polygon features I finally finished adding to the builder over the holidays.

Hi swill and everybody.  I'm new to this thread too, and to geekhack and to the mechanical keyboard scene.  I'm pretty blown away by all the great stuff going on here.  I am working on my own keyboard project and, like you, I have ended up working on software to generate drawings instead of using CAD tools.  Your plate builder was definitely an inspiration to me!

I spent some time trying to learn KiCad, but it drove me crazy with its terrible interface.  And so much of the layout of a keyboard PCB is just begging for automation, I decided just to learn about the Gerber format and develop some code to generate my PCB artwork directly from keyboard-layout-editor data.  I was also inspired by the work at http://pcbmode.com.

For my project, the keyboard controller is not going to be on the same board as the key switch matrix, so that simplifies things quite a bit for me.  Also, I have no interest in LEDs, which also simplifies my problem.  I am trying to avoid the general trace routing problem altogether by sticking to a simple design with columns on the front and rows on the back.  Right now I am basically cloning the TrueFox layout.  It's not exactly the layout I want, but it is close, and I can get the keycaps for it, so it's a good start.  The obvious matrix would be 16 columns by 5 rows, but that is an inefficient use of 21 GPIO.  So the most interesting thing that I think I am doing is using an 8x10 matrix where the columns are sort of folded in half and there are two matrix rows per physical row of keys.  Also, I am using copper pours for the rows and columns, which makes it easier to embed a key module without worrying about routing traces.

I have a long way to go, but maybe this image of my work in progress can help explain where I am going with it.

[attachimg=1]

Sorry if that is hard to read.  My code is a broken refactoring mess right now and that is the only image I have around to share.  This is my first post and I'm a noob with forum software, so I hope the image shows up...

-JR
Title: Re: The Living PCB Design Thread
Post by: swill on Tue, 03 January 2017, 06:22:28
Hey all.  I am new to this thread. I have not touched anything on the electrical side of building keyboards, and have only built boards based on PCBs designed by others.

I am the developer behind http://builder.swillkb.com (http://builder.swillkb.com).  Ironically, I started it because I was not confident in my cad skills and thought I should automate the plate layout.  Now it does quite a bit more than I was expecting when I started, but I have always had the pipe dream of being able to produce a PCB that goes with the layout specified.

The biggest hurdle I think I am going to have with this is the auto routing for the pcb.  I am only just starting to look into what I would need to do to even get something primitive built.

So my question is. What algorithms should I be researching, and what auto routing systems are best suited to designing keyboards. I know the following exist, but not much beyond that.

Maze router,
Line probe router,
Channel router,
Area routers,
Switchbox routing

Given my current skill level, I will probably have to spend a couple months just learning stuff. I would not expect to actually have anything written for about 6 months and really, who knows at that point.

If anyone has resources you can share that you think would be required reading for me, please share a link. If you have ideas or suggestions, please let me know as well.

Thanks for the help everyone. Happy new year. If you have not checked out the builder recently, you guys may be interested in the new custom polygon features I finally finished adding to the builder over the holidays.

Hi swill and everybody.  I'm new to this thread too, and to geekhack and to the mechanical keyboard scene.  I'm pretty blown away by all the great stuff going on here.  I am working on my own keyboard project and, like you, I have ended up working on software to generate drawings instead of using CAD tools.  Your plate builder was definitely an inspiration to me!

I spent some time trying to learn KiCad, but it drove me crazy with its terrible interface.  And so much of the layout of a keyboard PCB is just begging for automation, I decided just to learn about the Gerber format and develop some code to generate my PCB artwork directly from keyboard-layout-editor data.  I was also inspired by the work at http://pcbmode.com.

For my project, the keyboard controller is not going to be on the same board as the key switch matrix, so that simplifies things quite a bit for me.  Also, I have no interest in LEDs, which also simplifies my problem.  I am trying to avoid the general trace routing problem altogether by sticking to a simple design with columns on the front and rows on the back.  Right now I am basically cloning the TrueFox layout.  It's not exactly the layout I want, but it is close, and I can get the keycaps for it, so it's a good start.  The obvious matrix would be 16 columns by 5 rows, but that is an inefficient use of 21 GPIO.  So the most interesting thing that I think I am doing is using an 8x10 matrix where the columns are sort of folded in half and there are two matrix rows per physical row of keys.  Also, I am using copper pours for the rows and columns, which makes it easier to embed a key module without worrying about routing traces.

I have a long way to go, but maybe this image of my work in progress can help explain where I am going with it.

(Attachment Link)

Sorry if that is hard to read.  My code is a broken refactoring mess right now and that is the only image I have around to share.  This is my first post and I'm a noob with forum software, so I hope the image shows up...

-JR
Cool. That looks like a fun project. What language are you developing in?  How have you found the Gerber format to work with? I was also planning to export a Gerber file.  Are you building everything from scratch, or are you using some sort of engine for designing the components and exporting the final files?
Title: Re: The Living PCB Design Thread
Post by: kolec94 on Tue, 03 January 2017, 07:33:24
Hey all.  I am new to this thread. I have not touched anything on the electrical side of building keyboards, and have only built boards based on PCBs designed by others.

I am the developer behind http://builder.swillkb.com (http://builder.swillkb.com).  Ironically, I started it because I was not confident in my cad skills and thought I should automate the plate layout.  Now it does quite a bit more than I was expecting when I started, but I have always had the pipe dream of being able to produce a PCB that goes with the layout specified.

The biggest hurdle I think I am going to have with this is the auto routing for the pcb.  I am only just starting to look into what I would need to do to even get something primitive built.

So my question is. What algorithms should I be researching, and what auto routing systems are best suited to designing keyboards. I know the following exist, but not much beyond that.

Maze router,
Line probe router,
Channel router,
Area routers,
Switchbox routing

Given my current skill level, I will probably have to spend a couple months just learning stuff. I would not expect to actually have anything written for about 6 months and really, who knows at that point.

If anyone has resources you can share that you think would be required reading for me, please share a link. If you have ideas or suggestions, please let me know as well.

Thanks for the help everyone. Happy new year. If you have not checked out the builder recently, you guys may be interested in the new custom polygon features I finally finished adding to the builder over the holidays.
ok so what are you going to use as a controller diodes and other components?
do you have pcb models for different switch types?
led holes?

So right now I don't have anything, but I do have an idea of the things I will need.  I don't have modules built yet for switch and led layouts.  I will likely do SMD diodes and resistors (for LEDs, when I support them).  Ideally, I would build a standard footprint I use for every switch and use it everywhere.  That will make things easier from the dev side.  I have not talked to MOZ or Melvang about this yet, but I basically want to use something like a simplified Enabler PCB as the base switch component.  I know through hole is less daunting for builders, but I think most people are capable of soldering SMD (I was without much practice).  I think it is probably important to support SMD because it makes it easier to automate pick and place of components.  If people end up running small group buys based on the output, I think it gets us one step closer to a fully automated process.

The controller is a bit of a different story.  I would ideally like to give people options, but I have to start somewhere.  The ones that are on my radar would be something like; the SMD footprint for an ATMEGA32U4 (or similar), through hole pin set for the teensy (or similar).

My goal is to help enable builders and people with ideas to make it happen, so I am trying to solve the lowest common denominator with the most value to start with.  Then we go from there... 

To me, the auto routing is the biggest blind spot for me.  I know it is possible, but I also know it is non-trivial, so I have to get comfortable with how I am going to solve that before I get to deep into the weeds on some of the other pieces.  With the builder right now, I have the capability to draw vector files (svg+) and I already have the location of all the switches.  It would not be hard for me to start with a drill hole output, or even draw essentially the enabler at every switch location and just not route it.  Obviously not an end game solution, but it is a start.  It gets me to the point of being able to produce something of value.  With that as a starting point, I may be able to output as KiCad and people could manually route the pcb. 

Anyway, this is longer than I was planning to write.  There is a lot of ground I have to cover before I get to an end game solution, but I think there is probably a lot of value in some of the baby steps.  :)
ok how many layers are you wanting to use?
i would make the switch with diodes and everything a module for the switch
the issue i see is the matrix and getting a schematic from the layout and making sure that they are wired correctly in a schematic
Title: Re: The Living PCB Design Thread
Post by: swill on Tue, 03 January 2017, 08:09:09


Hey all.  I am new to this thread. I have not touched anything on the electrical side of building keyboards, and have only built boards based on PCBs designed by others.

I am the developer behind http://builder.swillkb.com (http://builder.swillkb.com).  Ironically, I started it because I was not confident in my cad skills and thought I should automate the plate layout.  Now it does quite a bit more than I was expecting when I started, but I have always had the pipe dream of being able to produce a PCB that goes with the layout specified.

The biggest hurdle I think I am going to have with this is the auto routing for the pcb.  I am only just starting to look into what I would need to do to even get something primitive built.

So my question is. What algorithms should I be researching, and what auto routing systems are best suited to designing keyboards. I know the following exist, but not much beyond that.

Maze router,
Line probe router,
Channel router,
Area routers,
Switchbox routing

Given my current skill level, I will probably have to spend a couple months just learning stuff. I would not expect to actually have anything written for about 6 months and really, who knows at that point.

If anyone has resources you can share that you think would be required reading for me, please share a link. If you have ideas or suggestions, please let me know as well.

Thanks for the help everyone. Happy new year. If you have not checked out the builder recently, you guys may be interested in the new custom polygon features I finally finished adding to the builder over the holidays.
ok so what are you going to use as a controller diodes and other components?
do you have pcb models for different switch types?
led holes?

So right now I don't have anything, but I do have an idea of the things I will need.  I don't have modules built yet for switch and led layouts.  I will likely do SMD diodes and resistors (for LEDs, when I support them).  Ideally, I would build a standard footprint I use for every switch and use it everywhere.  That will make things easier from the dev side.  I have not talked to MOZ or Melvang about this yet, but I basically want to use something like a simplified Enabler PCB as the base switch component.  I know through hole is less daunting for builders, but I think most people are capable of soldering SMD (I was without much practice).  I think it is probably important to support SMD because it makes it easier to automate pick and place of components.  If people end up running small group buys based on the output, I think it gets us one step closer to a fully automated process.

The controller is a bit of a different story.  I would ideally like to give people options, but I have to start somewhere.  The ones that are on my radar would be something like; the SMD footprint for an ATMEGA32U4 (or similar), through hole pin set for the teensy (or similar).

My goal is to help enable builders and people with ideas to make it happen, so I am trying to solve the lowest common denominator with the most value to start with.  Then we go from there... 

To me, the auto routing is the biggest blind spot for me.  I know it is possible, but I also know it is non-trivial, so I have to get comfortable with how I am going to solve that before I get to deep into the weeds on some of the other pieces.  With the builder right now, I have the capability to draw vector files (svg+) and I already have the location of all the switches.  It would not be hard for me to start with a drill hole output, or even draw essentially the enabler at every switch location and just not route it.  Obviously not an end game solution, but it is a start.  It gets me to the point of being able to produce something of value.  With that as a starting point, I may be able to output as KiCad and people could manually route the pcb. 

Anyway, this is longer than I was planning to write.  There is a lot of ground I have to cover before I get to an end game solution, but I think there is probably a lot of value in some of the baby steps.  :)
ok how many layers are you wanting to use?
i would make the switch with diodes and everything a module for the switch
the issue i see is the matrix and getting a schematic from the layout and making sure that they are wired correctly in a schematic

Yes. I have to have a way to verify the wiring works as expected.

Right now I am planning to use 2 layers.
Title: Re: The Living PCB Design Thread
Post by: kolec94 on Tue, 03 January 2017, 08:12:25


Hey all.  I am new to this thread. I have not touched anything on the electrical side of building keyboards, and have only built boards based on PCBs designed by others.

I am the developer behind http://builder.swillkb.com (http://builder.swillkb.com).  Ironically, I started it because I was not confident in my cad skills and thought I should automate the plate layout.  Now it does quite a bit more than I was expecting when I started, but I have always had the pipe dream of being able to produce a PCB that goes with the layout specified.

The biggest hurdle I think I am going to have with this is the auto routing for the pcb.  I am only just starting to look into what I would need to do to even get something primitive built.

So my question is. What algorithms should I be researching, and what auto routing systems are best suited to designing keyboards. I know the following exist, but not much beyond that.

Maze router,
Line probe router,
Channel router,
Area routers,
Switchbox routing

Given my current skill level, I will probably have to spend a couple months just learning stuff. I would not expect to actually have anything written for about 6 months and really, who knows at that point.

If anyone has resources you can share that you think would be required reading for me, please share a link. If you have ideas or suggestions, please let me know as well.

Thanks for the help everyone. Happy new year. If you have not checked out the builder recently, you guys may be interested in the new custom polygon features I finally finished adding to the builder over the holidays.
ok so what are you going to use as a controller diodes and other components?
do you have pcb models for different switch types?
led holes?

So right now I don't have anything, but I do have an idea of the things I will need.  I don't have modules built yet for switch and led layouts.  I will likely do SMD diodes and resistors (for LEDs, when I support them).  Ideally, I would build a standard footprint I use for every switch and use it everywhere.  That will make things easier from the dev side.  I have not talked to MOZ or Melvang about this yet, but I basically want to use something like a simplified Enabler PCB as the base switch component.  I know through hole is less daunting for builders, but I think most people are capable of soldering SMD (I was without much practice).  I think it is probably important to support SMD because it makes it easier to automate pick and place of components.  If people end up running small group buys based on the output, I think it gets us one step closer to a fully automated process.

The controller is a bit of a different story.  I would ideally like to give people options, but I have to start somewhere.  The ones that are on my radar would be something like; the SMD footprint for an ATMEGA32U4 (or similar), through hole pin set for the teensy (or similar).

My goal is to help enable builders and people with ideas to make it happen, so I am trying to solve the lowest common denominator with the most value to start with.  Then we go from there... 

To me, the auto routing is the biggest blind spot for me.  I know it is possible, but I also know it is non-trivial, so I have to get comfortable with how I am going to solve that before I get to deep into the weeds on some of the other pieces.  With the builder right now, I have the capability to draw vector files (svg+) and I already have the location of all the switches.  It would not be hard for me to start with a drill hole output, or even draw essentially the enabler at every switch location and just not route it.  Obviously not an end game solution, but it is a start.  It gets me to the point of being able to produce something of value.  With that as a starting point, I may be able to output as KiCad and people could manually route the pcb. 

Anyway, this is longer than I was planning to write.  There is a lot of ground I have to cover before I get to an end game solution, but I think there is probably a lot of value in some of the baby steps.  :)
ok how many layers are you wanting to use?
i would make the switch with diodes and everything a module for the switch
the issue i see is the matrix and getting a schematic from the layout and making sure that they are wired correctly in a schematic

Yes. I have to have a way to verify the wiring works as expected.

Right now I am planning to use 2 layers.
ok what cad software are you using for this?
Title: Re: The Living PCB Design Thread
Post by: swill on Tue, 03 January 2017, 08:30:42


Hey all.  I am new to this thread. I have not touched anything on the electrical side of building keyboards, and have only built boards based on PCBs designed by others.

I am the developer behind http://builder.swillkb.com (http://builder.swillkb.com).  Ironically, I started it because I was not confident in my cad skills and thought I should automate the plate layout.  Now it does quite a bit more than I was expecting when I started, but I have always had the pipe dream of being able to produce a PCB that goes with the layout specified.

The biggest hurdle I think I am going to have with this is the auto routing for the pcb.  I am only just starting to look into what I would need to do to even get something primitive built.

So my question is. What algorithms should I be researching, and what auto routing systems are best suited to designing keyboards. I know the following exist, but not much beyond that.

Maze router,
Line probe router,
Channel router,
Area routers,
Switchbox routing

Given my current skill level, I will probably have to spend a couple months just learning stuff. I would not expect to actually have anything written for about 6 months and really, who knows at that point.

If anyone has resources you can share that you think would be required reading for me, please share a link. If you have ideas or suggestions, please let me know as well.

Thanks for the help everyone. Happy new year. If you have not checked out the builder recently, you guys may be interested in the new custom polygon features I finally finished adding to the builder over the holidays.
ok so what are you going to use as a controller diodes and other components?
do you have pcb models for different switch types?
led holes?

So right now I don't have anything, but I do have an idea of the things I will need.  I don't have modules built yet for switch and led layouts.  I will likely do SMD diodes and resistors (for LEDs, when I support them).  Ideally, I would build a standard footprint I use for every switch and use it everywhere.  That will make things easier from the dev side.  I have not talked to MOZ or Melvang about this yet, but I basically want to use something like a simplified Enabler PCB as the base switch component.  I know through hole is less daunting for builders, but I think most people are capable of soldering SMD (I was without much practice).  I think it is probably important to support SMD because it makes it easier to automate pick and place of components.  If people end up running small group buys based on the output, I think it gets us one step closer to a fully automated process.

The controller is a bit of a different story.  I would ideally like to give people options, but I have to start somewhere.  The ones that are on my radar would be something like; the SMD footprint for an ATMEGA32U4 (or similar), through hole pin set for the teensy (or similar).

My goal is to help enable builders and people with ideas to make it happen, so I am trying to solve the lowest common denominator with the most value to start with.  Then we go from there... 

To me, the auto routing is the biggest blind spot for me.  I know it is possible, but I also know it is non-trivial, so I have to get comfortable with how I am going to solve that before I get to deep into the weeds on some of the other pieces.  With the builder right now, I have the capability to draw vector files (svg+) and I already have the location of all the switches.  It would not be hard for me to start with a drill hole output, or even draw essentially the enabler at every switch location and just not route it.  Obviously not an end game solution, but it is a start.  It gets me to the point of being able to produce something of value.  With that as a starting point, I may be able to output as KiCad and people could manually route the pcb. 

Anyway, this is longer than I was planning to write.  There is a lot of ground I have to cover before I get to an end game solution, but I think there is probably a lot of value in some of the baby steps.  :)
ok how many layers are you wanting to use?
i would make the switch with diodes and everything a module for the switch
the issue i see is the matrix and getting a schematic from the layout and making sure that they are wired correctly in a schematic

Yes. I have to have a way to verify the wiring works as expected.

Right now I am planning to use 2 layers.
ok what cad software are you using for this?
Right now, I am not. I have basically built my own cad engine from scratch in Golang because everything I found was bloated and not friendly to be automated.

For the electrical stuff I will probably have to find an engine I can work with. Ideally open source, or at least free, which I can package with my deployments. Do you have suggestions on this front?
Title: Re: The Living PCB Design Thread
Post by: kolec94 on Tue, 03 January 2017, 11:10:24


Hey all.  I am new to this thread. I have not touched anything on the electrical side of building keyboards, and have only built boards based on PCBs designed by others.

I am the developer behind http://builder.swillkb.com (http://builder.swillkb.com).  Ironically, I started it because I was not confident in my cad skills and thought I should automate the plate layout.  Now it does quite a bit more than I was expecting when I started, but I have always had the pipe dream of being able to produce a PCB that goes with the layout specified.

The biggest hurdle I think I am going to have with this is the auto routing for the pcb.  I am only just starting to look into what I would need to do to even get something primitive built.

So my question is. What algorithms should I be researching, and what auto routing systems are best suited to designing keyboards. I know the following exist, but not much beyond that.

Maze router,
Line probe router,
Channel router,
Area routers,
Switchbox routing

Given my current skill level, I will probably have to spend a couple months just learning stuff. I would not expect to actually have anything written for about 6 months and really, who knows at that point.

If anyone has resources you can share that you think would be required reading for me, please share a link. If you have ideas or suggestions, please let me know as well.

Thanks for the help everyone. Happy new year. If you have not checked out the builder recently, you guys may be interested in the new custom polygon features I finally finished adding to the builder over the holidays.
ok so what are you going to use as a controller diodes and other components?
do you have pcb models for different switch types?
led holes?

So right now I don't have anything, but I do have an idea of the things I will need.  I don't have modules built yet for switch and led layouts.  I will likely do SMD diodes and resistors (for LEDs, when I support them).  Ideally, I would build a standard footprint I use for every switch and use it everywhere.  That will make things easier from the dev side.  I have not talked to MOZ or Melvang about this yet, but I basically want to use something like a simplified Enabler PCB as the base switch component.  I know through hole is less daunting for builders, but I think most people are capable of soldering SMD (I was without much practice).  I think it is probably important to support SMD because it makes it easier to automate pick and place of components.  If people end up running small group buys based on the output, I think it gets us one step closer to a fully automated process.

The controller is a bit of a different story.  I would ideally like to give people options, but I have to start somewhere.  The ones that are on my radar would be something like; the SMD footprint for an ATMEGA32U4 (or similar), through hole pin set for the teensy (or similar).

My goal is to help enable builders and people with ideas to make it happen, so I am trying to solve the lowest common denominator with the most value to start with.  Then we go from there... 

To me, the auto routing is the biggest blind spot for me.  I know it is possible, but I also know it is non-trivial, so I have to get comfortable with how I am going to solve that before I get to deep into the weeds on some of the other pieces.  With the builder right now, I have the capability to draw vector files (svg+) and I already have the location of all the switches.  It would not be hard for me to start with a drill hole output, or even draw essentially the enabler at every switch location and just not route it.  Obviously not an end game solution, but it is a start.  It gets me to the point of being able to produce something of value.  With that as a starting point, I may be able to output as KiCad and people could manually route the pcb. 

Anyway, this is longer than I was planning to write.  There is a lot of ground I have to cover before I get to an end game solution, but I think there is probably a lot of value in some of the baby steps.  :)
ok how many layers are you wanting to use?
i would make the switch with diodes and everything a module for the switch
the issue i see is the matrix and getting a schematic from the layout and making sure that they are wired correctly in a schematic

Yes. I have to have a way to verify the wiring works as expected.

Right now I am planning to use 2 layers.
ok what cad software are you using for this?
Right now, I am not. I have basically built my own cad engine from scratch in Golang because everything I found was bloated and not friendly to be automated.

For the electrical stuff I will probably have to find an engine I can work with. Ideally open source, or at least free, which I can package with my deployments. Do you have suggestions on this front?
you should take a look at the kicad api
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Tue, 03 January 2017, 13:54:35
I've been reading fellow users' schematics and it looks like that AREF actually requires a 0.1µF capacitor.
Other than that, a resistor is provided to the reset pin, no matter if the HWB has one on its own already.
If both statements are true, I should be good with the following schematic.
Can anyone confirm?
TIA.

(http://i.imgur.com/KFsDhfD.png)
Title: Re: The Living PCB Design Thread
Post by: swill on Tue, 03 January 2017, 14:34:12


Hey all.  I am new to this thread. I have not touched anything on the electrical side of building keyboards, and have only built boards based on PCBs designed by others.

I am the developer behind http://builder.swillkb.com (http://builder.swillkb.com).  Ironically, I started it because I was not confident in my cad skills and thought I should automate the plate layout.  Now it does quite a bit more than I was expecting when I started, but I have always had the pipe dream of being able to produce a PCB that goes with the layout specified.

The biggest hurdle I think I am going to have with this is the auto routing for the pcb.  I am only just starting to look into what I would need to do to even get something primitive built.

So my question is. What algorithms should I be researching, and what auto routing systems are best suited to designing keyboards. I know the following exist, but not much beyond that.

Maze router,
Line probe router,
Channel router,
Area routers,
Switchbox routing

Given my current skill level, I will probably have to spend a couple months just learning stuff. I would not expect to actually have anything written for about 6 months and really, who knows at that point.

If anyone has resources you can share that you think would be required reading for me, please share a link. If you have ideas or suggestions, please let me know as well.

Thanks for the help everyone. Happy new year. If you have not checked out the builder recently, you guys may be interested in the new custom polygon features I finally finished adding to the builder over the holidays.
ok so what are you going to use as a controller diodes and other components?
do you have pcb models for different switch types?
led holes?

So right now I don't have anything, but I do have an idea of the things I will need.  I don't have modules built yet for switch and led layouts.  I will likely do SMD diodes and resistors (for LEDs, when I support them).  Ideally, I would build a standard footprint I use for every switch and use it everywhere.  That will make things easier from the dev side.  I have not talked to MOZ or Melvang about this yet, but I basically want to use something like a simplified Enabler PCB as the base switch component.  I know through hole is less daunting for builders, but I think most people are capable of soldering SMD (I was without much practice).  I think it is probably important to support SMD because it makes it easier to automate pick and place of components.  If people end up running small group buys based on the output, I think it gets us one step closer to a fully automated process.

The controller is a bit of a different story.  I would ideally like to give people options, but I have to start somewhere.  The ones that are on my radar would be something like; the SMD footprint for an ATMEGA32U4 (or similar), through hole pin set for the teensy (or similar).

My goal is to help enable builders and people with ideas to make it happen, so I am trying to solve the lowest common denominator with the most value to start with.  Then we go from there... 

To me, the auto routing is the biggest blind spot for me.  I know it is possible, but I also know it is non-trivial, so I have to get comfortable with how I am going to solve that before I get to deep into the weeds on some of the other pieces.  With the builder right now, I have the capability to draw vector files (svg+) and I already have the location of all the switches.  It would not be hard for me to start with a drill hole output, or even draw essentially the enabler at every switch location and just not route it.  Obviously not an end game solution, but it is a start.  It gets me to the point of being able to produce something of value.  With that as a starting point, I may be able to output as KiCad and people could manually route the pcb. 

Anyway, this is longer than I was planning to write.  There is a lot of ground I have to cover before I get to an end game solution, but I think there is probably a lot of value in some of the baby steps.  :)
ok how many layers are you wanting to use?
i would make the switch with diodes and everything a module for the switch
the issue i see is the matrix and getting a schematic from the layout and making sure that they are wired correctly in a schematic

Yes. I have to have a way to verify the wiring works as expected.

Right now I am planning to use 2 layers.
ok what cad software are you using for this?
Right now, I am not. I have basically built my own cad engine from scratch in Golang because everything I found was bloated and not friendly to be automated.

For the electrical stuff I will probably have to find an engine I can work with. Ideally open source, or at least free, which I can package with my deployments. Do you have suggestions on this front?
you should take a look at the kicad api
Yes. I think that is probably my best bet. Thanks. :)
Title: Re: The Living PCB Design Thread
Post by: jrmobley on Tue, 03 January 2017, 17:09:06
Hey all.  I am new to this thread. I have not touched anything on the electrical side of building keyboards, and have only built boards based on PCBs designed by others.

I am the developer behind http://builder.swillkb.com (http://builder.swillkb.com).  Ironically, I started it because I was not confident in my cad skills and thought I should automate the plate layout.  Now it does quite a bit more than I was expecting when I started, but I have always had the pipe dream of being able to produce a PCB that goes with the layout specified.

The biggest hurdle I think I am going to have with this is the auto routing for the pcb.  I am only just starting to look into what I would need to do to even get something primitive built.

So my question is. What algorithms should I be researching, and what auto routing systems are best suited to designing keyboards. I know the following exist, but not much beyond that.

Maze router,
Line probe router,
Channel router,
Area routers,
Switchbox routing

Given my current skill level, I will probably have to spend a couple months just learning stuff. I would not expect to actually have anything written for about 6 months and really, who knows at that point.

If anyone has resources you can share that you think would be required reading for me, please share a link. If you have ideas or suggestions, please let me know as well.

Thanks for the help everyone. Happy new year. If you have not checked out the builder recently, you guys may be interested in the new custom polygon features I finally finished adding to the builder over the holidays.

Hi swill and everybody.  I'm new to this thread too, and to geekhack and to the mechanical keyboard scene.  I'm pretty blown away by all the great stuff going on here.  I am working on my own keyboard project and, like you, I have ended up working on software to generate drawings instead of using CAD tools.  Your plate builder was definitely an inspiration to me!

I spent some time trying to learn KiCad, but it drove me crazy with its terrible interface.  And so much of the layout of a keyboard PCB is just begging for automation, I decided just to learn about the Gerber format and develop some code to generate my PCB artwork directly from keyboard-layout-editor data.  I was also inspired by the work at http://pcbmode.com.

For my project, the keyboard controller is not going to be on the same board as the key switch matrix, so that simplifies things quite a bit for me.  Also, I have no interest in LEDs, which also simplifies my problem.  I am trying to avoid the general trace routing problem altogether by sticking to a simple design with columns on the front and rows on the back.  Right now I am basically cloning the TrueFox layout.  It's not exactly the layout I want, but it is close, and I can get the keycaps for it, so it's a good start.  The obvious matrix would be 16 columns by 5 rows, but that is an inefficient use of 21 GPIO.  So the most interesting thing that I think I am doing is using an 8x10 matrix where the columns are sort of folded in half and there are two matrix rows per physical row of keys.  Also, I am using copper pours for the rows and columns, which makes it easier to embed a key module without worrying about routing traces.

I have a long way to go, but maybe this image of my work in progress can help explain where I am going with it.

(Attachment Link)

Sorry if that is hard to read.  My code is a broken refactoring mess right now and that is the only image I have around to share.  This is my first post and I'm a noob with forum software, so I hope the image shows up...

-JR
Cool. That looks like a fun project. What language are you developing in?  How have you found the Gerber format to work with? I was also planning to export a Gerber file.  Are you building everything from scratch, or are you using some sort of engine for designing the components and exporting the final files?

I am working in Python and I'm writing everything from scratch.  I don't know of any libraries for building circuits with code, other than the scripting interfaces for things like Eagle and KiCad, and I decided I didn't want to get tangled up with those.  After I get the key switch PCB finished, I will have to decide what to do about my controller board.  Will my code be functional enough to use for that?  I plan to prototype a controller on a breadboard first, so maybe I will try Fritzing for that board.

Gerber has been enjoyable.  I am not writing any Gerber output yet, but I am building all of my internal data structures based on the Gerber file structure, so I expect the final output to be a simple process.  The format has some entertaining terminology quirks because of its history as a CAM format for old photo plotters, but basically it is a simple vector graphics drawing format.  The documentation is very good I think.
Title: Re: The Living PCB Design Thread
Post by: swill on Tue, 03 January 2017, 20:23:23


Cool. That looks like a fun project. What language are you developing in?  How have you found the Gerber format to work with? I was also planning to export a Gerber file.  Are you building everything from scratch, or are you using some sort of engine for designing the components and exporting the final files?

I am working in Python and I'm writing everything from scratch.  I don't know of any libraries for building circuits with code, other than the scripting interfaces for things like Eagle and KiCad, and I decided I didn't want to get tangled up with those.  After I get the key switch PCB finished, I will have to decide what to do about my controller board.  Will my code be functional enough to use for that?  I plan to prototype a controller on a breadboard first, so maybe I will try Fritzing for that board.

Gerber has been enjoyable.  I am not writing any Gerber output yet, but I am building all of my internal data structures based on the Gerber file structure, so I expect the final output to be a simple process.  The format has some entertaining terminology quirks because of its history as a CAM format for old photo plotters, but basically it is a simple vector graphics drawing format.  The documentation is very good I think.

I did the original builder (https://github.com/swill/kb_builder) in Python (and FreeCAD), and I got sick of dealing with the crap of a cad software, so I just started from scratch in Golang.

I was chatting with some guys on the kicad IRC, and they basically recommended that I just output to whatever file format I want and skip kicad all together if I want to automate anything.  I had a look at the kicad "api" and its not really an API. It is basically a swig wrapper around the C++ code, so that's not really a good option for me. I could embed the C++ code directly into golang, but I think I am probably going to start by just building from scratch.

My code already works natively with the svg format and I have a pretty good set of polygon features now too. I think I will start by doing svg to Gerber. I see that pcbmode already has that feature, so I can probably understand the conversion from that. Thanks for the link.

This is going to be an interesting project.

BTW, I like your idea for the 8x10 matrix, that's a good idea. Not doing a controller on the board is smart to start with to reduce complexity. Are you just going to do something like a teensy header pin layout in through hole?

I like your project and approach. I think our projects have a lot in common. :)
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Tue, 03 January 2017, 21:21:29


Cool. That looks like a fun project. What language are you developing in?  How have you found the Gerber format to work with? I was also planning to export a Gerber file.  Are you building everything from scratch, or are you using some sort of engine for designing the components and exporting the final files?

I am working in Python and I'm writing everything from scratch.  I don't know of any libraries for building circuits with code, other than the scripting interfaces for things like Eagle and KiCad, and I decided I didn't want to get tangled up with those.  After I get the key switch PCB finished, I will have to decide what to do about my controller board.  Will my code be functional enough to use for that?  I plan to prototype a controller on a breadboard first, so maybe I will try Fritzing for that board.

Gerber has been enjoyable.  I am not writing any Gerber output yet, but I am building all of my internal data structures based on the Gerber file structure, so I expect the final output to be a simple process.  The format has some entertaining terminology quirks because of its history as a CAM format for old photo plotters, but basically it is a simple vector graphics drawing format.  The documentation is very good I think.

I did the original builder (https://github.com/swill/kb_builder) in Python (and FreeCAD), and I got sick of dealing with the crap of a cad software, so I just started from scratch in Golang.

I was chatting with some guys on the kicad IRC, and they basically recommended that I just output to whatever file format I want and skip kicad all together if I want to automate anything.  I had a look at the kicad "api" and its not really an API. It is basically a swig wrapper around the C++ code, so that's not really a good option for me. I could embed the C++ code directly into golang, but I think I am probably going to start by just building from scratch.

My code already works natively with the svg format and I have a pretty good set of polygon features now too. I think I will start by doing svg to Gerber. I see that pcbmode already has that feature, so I can probably understand the conversion from that. Thanks for the link.

This is going to be an interesting project.

BTW, I like your idea for the 8x10 matrix, that's a good idea. Not doing a controller on the board is smart to start with to reduce complexity. Are you just going to do something like a teensy header pin layout in through hole?

I like your project and approach. I think our projects have a lot in common. :)
If you can output the center point of each switch that would make placing the switches and other components a lot easier as kicads placement allows for direct input of the XY location value of each component. I always do it the harder way and get a spreadsheet going and math and 19.05+19.05 and 19.05/4 ugh brain hurts just thinking about it.

sent from my chess board
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Tue, 03 January 2017, 23:23:47
I've been reading fellow users' schematics and it looks like that AREF actually requires a 0.1µF capacitor.
Other than that, a resistor is provided to the reset pin, no matter if the HWB has one on its own already.
If both statements are true, I should be good with the following schematic.
Can anyone confirm?
TIA.

The capacitor on AREF is optional. If you're not going to do any analog sensing you really don't need it. It doesn't hurt in any way to put it there either. Just leave the pin floating (unconnected) if you don't put a capacitor there.

The HWB pin decides what happens when the chip is reset. If it is tied to GND the bootloader starts, if high execution of the firmware starts. It however is a bit dangerous connecting an IO-pin directly to one of the power rails, hence you use a resistor in series. This resistor has got nothing to do with the one on the reset pin. HWB is pretty much just another IO-pin along the rest.

The resistor on the reset pin is a pull-up resistor. It ensures that reset is tied to VCC (much the same way as HWB to GND), but in this case you also have a switch to short the pin out directly to GND. You actually don't need that resistor either as there is an internal pull-up resistor on the reset pin (as well as all other IO-pins).

Edit: Also, I don't know if it has been mentioned, but the value for the capacitor on the crystal depends on the specific crystal you use. You need to figure out the correct value, and then see if it works. Which it probably will, but if not some experimentation may be needed. I wouldn't worry much about it not working though, it probably will.
Title: Re: The Living PCB Design Thread
Post by: jrmobley on Wed, 04 January 2017, 03:12:44


I am working in Python and I'm writing everything from scratch.  I don't know of any libraries for building circuits with code, other than the scripting interfaces for things like Eagle and KiCad, and I decided I didn't want to get tangled up with those.  After I get the key switch PCB finished, I will have to decide what to do about my controller board.  Will my code be functional enough to use for that?  I plan to prototype a controller on a breadboard first, so maybe I will try Fritzing for that board.

Gerber has been enjoyable.  I am not writing any Gerber output yet, but I am building all of my internal data structures based on the Gerber file structure, so I expect the final output to be a simple process.  The format has some entertaining terminology quirks because of its history as a CAM format for old photo plotters, but basically it is a simple vector graphics drawing format.  The documentation is very good I think.

I did the original builder (https://github.com/swill/kb_builder) in Python (and FreeCAD), and I got sick of dealing with the crap of a cad software, so I just started from scratch in Golang.

I was chatting with some guys on the kicad IRC, and they basically recommended that I just output to whatever file format I want and skip kicad all together if I want to automate anything.  I had a look at the kicad "api" and its not really an API. It is basically a swig wrapper around the C++ code, so that's not really a good option for me. I could embed the C++ code directly into golang, but I think I am probably going to start by just building from scratch.

My code already works natively with the svg format and I have a pretty good set of polygon features now too. I think I will start by doing svg to Gerber. I see that pcbmode already has that feature, so I can probably understand the conversion from that. Thanks for the link.

This is going to be an interesting project.

BTW, I like your idea for the 8x10 matrix, that's a good idea. Not doing a controller on the board is smart to start with to reduce complexity. Are you just going to do something like a teensy header pin layout in through hole?

I like your project and approach. I think our projects have a lot in common. :)

Haha, yeah it sounds like both of us would rather spend six months writing our own software than six weeks learning to use ugly software.  No offense to any KiCad fans out there, but, ugh.

My project isn't actually a PC keyboard.  I am making an all-in-one style computer around Raspberry Pi.  So under the keyboard, I'll have the RasPi "motherboard" plus a secondary interface board that will have the keyboard controller as well as some additional interface circuitry, like joystick connectors and maybe a secondary SD card slot.  I'm going for an old school home computer type unit of the 80's.  So the keyboard PCB itself will just have a header connector for connecting to the interface board.  I am making everything through-hole for easy soldering and because I want it to be something you can open up and look at and understand and tinker with.  So, kinda retro.  I think I will be able to use a 28 pin DIP ATmega328P for the controller.  Basically an Arduino.  It will talk to the RaspPi over I2C or SPI.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 04 January 2017, 03:34:18
The capacitor on AREF is optional. If you're not going to do any analog sensing you really don't need it. It doesn't hurt in any way to put it there either. Just leave the pin floating (unconnected) if you don't put a capacitor there.
Noted. I'm inclined towards leaving it floating then.

The HWB pin decides what happens when the chip is reset. If it is tied to GND the bootloader starts, if high execution of the firmware starts. It however is a bit dangerous connecting an IO-pin directly to one of the power rails, hence you use a resistor in series. This resistor has got nothing to do with the one on the reset pin. HWB is pretty much just another IO-pin along the rest.
That makes sense, thanks. Although, out of sheer curiosity, what do you mean by "bit dangerous"? Would the absence of a resistor fry the IC?

The resistor on the reset pin is a pull-up resistor. It ensures that reset is tied to VCC (much the same way as HWB to GND), but in this case you also have a switch to short the pin out directly to GND. You actually don't need that resistor either as there is an internal pull-up resistor on the reset pin (as well as all other IO-pins).
Is the internal pull-up resistor strong enough for this purpose? I've read they are a bit weak and I would certainly better be safe than sorry and put an external resitor.

Also, I don't know if it has been mentioned, but the value for the capacitor on the crystal depends on the specific crystal you use. You need to figure out the correct value, and then see if it works. Which it probably will, but if not some experimentation may be needed. I wouldn't worry much about it not working though, it probably will.
I'm using a 16MHz crystal with two 10pF electrolytic capacitors because it's the same setup of the Teensy 2.0. I know nothing of crystals, I don't know wheter to choose one or another, nor how to calculate the capacitors' values for it. If you could suggest some reading about it, I would appreciate it.

Thank you for all your answers and your time.
Title: Re: The Living PCB Design Thread
Post by: vvp on Wed, 04 January 2017, 04:51:51
I'm using a 16MHz crystal with two 10pF electrolytic capacitors because it's the same setup of the Teensy 2.0. I know nothing of crystals, I don't know wheter to choose one or another, nor how to calculate the capacitors' values for it. If you could suggest some reading about it, I would appreciate it.
Here (http://www.st.com/content/ccc/resource/technical/document/application_note/c6/eb/5e/11/e3/69/43/eb/CD00221665.pdf/files/CD00221665.pdf/jcr:content/translations/en.CD00221665.pdf)  is an example what everything should be considered to have your crystal just right. Unfortunately it is not for ATmega32u4 but the approach is the same and maybe you can find an application note for ATmega32u4 too. If you find it then post it here :)
If you do not want to bother with it then use exactly the same crystal with exactly the same capacitors (and the resistor if applicable). There are many 16 MHz crystals and they required different capacitors and some of them also an resistor when paired with a particular MCU. If you do not have the parts for your crystal right then it will probably work but may have imprecise frequency or the crystal may fail sooner (if you e.g. overdrive it).
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 04 January 2017, 05:12:34
I've found this design guide (https://www.google.se/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&ved=0ahUKEwiQ6OarrKjRAhWHDiwKHSLGBPgQFgglMAI&url=http%3A%2F%2Fwww.atmel.com%2Fimages%2Fatmel-2521-avr-hardware-design-considerations_applicationnote_avr042.pdf&usg=AFQjCNGve3LdduPw0u8S-eeZIAlw1ISV9A&sig2=IbCGP51m3unTYj6FlDvUqA) for Atmel. Section 5 is about crystals.


The HWB pin decides what happens when the chip is reset. If it is tied to GND the bootloader starts, if high execution of the firmware starts. It however is a bit dangerous connecting an IO-pin directly to one of the power rails, hence you use a resistor in series. This resistor has got nothing to do with the one on the reset pin. HWB is pretty much just another IO-pin along the rest.
That makes sense, thanks. Although, out of sheer curiosity, what do you mean by "bit dangerous"? Would the absence of a resistor fry the IC?

It could if you accidentally drive the pin as an output opposite to the level which it is connected to. As an input there is virtually no current flowing through the resistor and the pin sees the voltage level on the other side of the resistor anyway.


The resistor on the reset pin is a pull-up resistor. It ensures that reset is tied to VCC (much the same way as HWB to GND), but in this case you also have a switch to short the pin out directly to GND. You actually don't need that resistor either as there is an internal pull-up resistor on the reset pin (as well as all other IO-pins).
Is the internal pull-up resistor strong enough for this purpose? I've read they are a bit weak and I would certainly better be safe than sorry and put an external resitor.

I've never used any extra pull-up for the reset. The Teensies don't either, and I've never heard of anyone having troubles with it. You're probably more probable to screw it up by connecting extra stuff (which i have seen), rather than just using it as it was intended to.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 04 January 2017, 06:58:15
Here (http://www.st.com/content/ccc/resource/technical/document/application_note/c6/eb/5e/11/e3/69/43/eb/CD00221665.pdf/files/CD00221665.pdf/jcr:content/translations/en.CD00221665.pdf)  is an example what everything should be considered to have your crystal just right.

I've found this design guide (https://www.google.se/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&ved=0ahUKEwiQ6OarrKjRAhWHDiwKHSLGBPgQFgglMAI&url=http%3A%2F%2Fwww.atmel.com%2Fimages%2Fatmel-2521-avr-hardware-design-considerations_applicationnote_avr042.pdf&usg=AFQjCNGve3LdduPw0u8S-eeZIAlw1ISV9A&sig2=IbCGP51m3unTYj6FlDvUqA) for Atmel. Section 5 is about crystals.
Thanks both for the links.

There are many 16 MHz crystals and they required different capacitors and some of them also an resistor when paired with a particular MCU. If you do not have the parts for your crystal right then it will probably work but may have imprecise frequency or the crystal may fail sooner (if you e.g. overdrive it).
Would you recommend any to buy?

The HWB pin decides what happens when the chip is reset. If it is tied to GND the bootloader starts, if high execution of the firmware starts. It however is a bit dangerous connecting an IO-pin directly to one of the power rails, hence you use a resistor in series. This resistor has got nothing to do with the one on the reset pin. HWB is pretty much just another IO-pin along the rest.
That makes sense, thanks. Although, out of sheer curiosity, what do you mean by "bit dangerous"? Would the absence of a resistor fry the IC?
It could if you accidentally drive the pin as an output opposite to the level which it is connected to. As an input there is virtually no current flowing through the resistor and the pin sees the voltage level on the other side of the resistor anyway.
Got it. Thanks.

The resistor on the reset pin is a pull-up resistor. It ensures that reset is tied to VCC (much the same way as HWB to GND), but in this case you also have a switch to short the pin out directly to GND. You actually don't need that resistor either as there is an internal pull-up resistor on the reset pin (as well as all other IO-pins).
Is the internal pull-up resistor strong enough for this purpose? I've read they are a bit weak and I would certainly better be safe than sorry and put an external resitor.

I've never used any extra pull-up for the reset. The Teensies don't either, and I've never heard of anyone having troubles with it. You're probably more probable to screw it up by connecting extra stuff (which i have seen), rather than just using it as it was intended to.
I'll leave the resistor out then.

Thank you good sirs.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 04 January 2017, 08:44:07
To be on the cautious side you can keep the resistor footprint, and just not populate it. Then you have the option to add a resistor if you run into trouble.
Title: Re: The Living PCB Design Thread
Post by: swill on Wed, 04 January 2017, 08:57:26
Haha, yeah it sounds like both of us would rather spend six months writing our own software than six weeks learning to use ugly software.  No offense to any KiCad fans out there, but, ugh.

My project isn't actually a PC keyboard.  I am making an all-in-one style computer around Raspberry Pi.  So under the keyboard, I'll have the RasPi "motherboard" plus a secondary interface board that will have the keyboard controller as well as some additional interface circuitry, like joystick connectors and maybe a secondary SD card slot.  I'm going for an old school home computer type unit of the 80's.  So the keyboard PCB itself will just have a header connector for connecting to the interface board.  I am making everything through-hole for easy soldering and because I want it to be something you can open up and look at and understand and tinker with.  So, kinda retro.  I think I will be able to use a 28 pin DIP ATmega328P for the controller.  Basically an Arduino.  It will talk to the RaspPi over I2C or SPI.

Haha.  Ya, that is pretty accurate.  For me, the builder is a fun project that I do on my own time, so I have to be having fun with it for it to be worth it and for me to be motivated to actually work on it.  So if something takes me 6 months, but I have fun doing it, then it is all good.  I would rather do that than spend 6 weeks working with something I don't really like and then have to maintain that integration for ever. 

Ya, that is a pretty cool project.  If you need a case for your project, you know where to go.  :P
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 04 January 2017, 08:59:15
To be on the cautious side you can keep the resistor footprint, and just not populate it. Then you have the option to add a resistor if you run into trouble.
Great idea. I guess I need some sort of jumping wire or 0 Ohm resistor in this case, don't I?
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 04 January 2017, 09:08:43
To be on the cautious side you can keep the resistor footprint, and just not populate it. Then you have the option to add a resistor if you run into trouble.
Great idea. I guess I need some sort of jumping wire or 0 Ohm resistor in this case, don't I?

No, that would be really bad =D Ask yourself; What would happen if I close that reset switch with a jumper in place of the resistor?.. Just leave it empty.
Title: Re: The Living PCB Design Thread
Post by: vvp on Wed, 04 January 2017, 09:14:47
Would you recommend any to buy?
Sorry I do not. I'm not using ATmega in my keyboards.

Note: I'm not expert in crystal design. Hopefully if somebody is and notices some errors here then he will point them out. I only read quite a bit about the problem so that my crystals are good enough for a full speed USB.

If you want to have this really easy just take the same parts(*) which are on some ATmega32u4 device which has published schematic with precise part numbers. Maybe take it from some Arduino board. Also place crystal (and the related parts and traces) close to the MCU in a similar way as it is in the PCB of the device you are taking part numbers from. It is not such a big deal in the end. The precisely matching capacitors are mostly about how precise the final oscillation frequency of the crystal will be.  For a keyboard project it is not a big problem because it is not probable you would get more than 0.25% imprecision in the clock (which is required by full speed USB). So in common cases, you can get your load capacitors wrong by about 4 pF and USB will not mind at all. That is good because you will be probably only guessing circuit board stray capacitance which is around 5 - 10 pF. So you can still guess your PCB stray capacitance quite badly and have it working overall.

(*) crystal and its loading capacitors (and also the resistor if applicable)
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 04 January 2017, 13:45:11
No, that would be really bad =D Ask yourself; What would happen if I close that reset switch with a jumper in place of the resistor?.. Just leave it empty.
Right. It feels like sometimes I don't think.

I'm not using ATmega in my keyboards.
Do you mind if I ask what do you use then? I was wondering about alternative controllers.

And thanks for the explaination about crystals.
Title: Re: The Living PCB Design Thread
Post by: vvp on Wed, 04 January 2017, 14:34:45
I use ATxmega64a4u or ATxmega128a4u.
This is not a recommendation from me to use them. They are OK but a bit expensive for a new design. They are slightly less expensive than ATmega32u4 but significantly more expensive than cheap Arm Cortex-M0 MCUs (e.g. STM32F072C).

I happened to use the ATxmega chips because it was very easy to port my favorite firmware to it. A firmware with a LUFA back-end can be ported to atxmega from atmega in about a day (if you know C programming).

Anyway a good thing about ATxmega64a4u or STM32F072 or e.g. MKL27Z128VLH4 is that they do not need crystal for proper USB functionality. I needed a crystal for a non-keyboard project with STM32F3xx MCU.
Title: Re: The Living PCB Design Thread
Post by: climbalima on Wed, 04 January 2017, 20:27:30
One board to rule them all, routed and ready for any occasion ;)
https://geekhack.org/index.php?topic=38414.msg757373#msg757373

Lol im workingon a similar board for 40%. im still in the proto stage, but its 12x4 and supports planck/jd40

(http://i.imgur.com/KJoDie1.jpg)


(http://i.imgur.com/JdlI0vi.jpg)
Title: Re: The Living PCB Design Thread
Post by: rrrsss on Sun, 08 January 2017, 04:56:06
glad to see this thread still running! I'm planning to make my own 1column pcbs and a wireless keyboard based on an existing schematic, but still not sure about sending them off to the fab. How and where should I go about reassuring myself? I don't mind uploading the files here, but what should I upload? The kicad_pcb and sch? or the whole folder?
Title: Re: The Living PCB Design Thread
Post by: 27.9.2016 on Thu, 12 January 2017, 16:25:24
My DIY project

(http://i.imgur.com/KaKJgko.png)

(http://i.imgur.com/j3oXtaJ.png)

(http://i.imgur.com/MYYK5CZ.png)

What do you thing does it look good? I am planning on etching this PCB by myself with UV process  ;D
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Fri, 13 January 2017, 15:09:00
What do you thing does it look good? I am planning on etching this PCB by myself with UV process  ;D

It looks alright, it looks auto-routed.. You could clean up a few wacky vias around the Teensy. With a little bit of effort you could probably straighten a few more things out by re-arranging some more. But on the other hand it will surely work, and time can be spent better =) If you etch at home you may want to increase the trace widths to add some extra margin.

If you're not etching a double sided board you may also want to try to move more of the traces to the same side. I would put all traces around the Teensy on the bottom. Otherwise it will be hard to solder (on a single sided board). The long straight horizontal traces would be easily made from jumper wires, if on the back.. I can't say straight that it's feasible to "reverse" the layers like this, that would take some more experimenting. Silly me, jumpers can of course be placed anywhere =P Also drilling PCB laminates is a b****, and you need to be very accurate for the switches to sit straight. And you need really good alignment if you're doing a double sided board. But hey you'll be really pleased with yourself once you finish =D

To save etchant you can also add copper fills, just make sure they are connected to something (GND preferably) and not floating free. That probably wouldn't impede functionality much in this case, but it's considered bad practice..
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Sat, 14 January 2017, 16:44:01
https://github.com/ruiqimao/keyboard-pcb-guide#setting-up
A guy on r/MK did this and it is really nice. https://www.reddit.com/r/MechanicalKeyboards/comments/5nzpd2/guide_how_to_make_your_own_keyboard_pcb/
Title: Re: The Living PCB Design Thread
Post by: krownedk1ng on Sat, 14 January 2017, 23:54:43
Hi everyone,

I'm looking at getting some feedback on my PCB and schematic design that I've been working on. The PCB was laid out by using http://keyboard-layout-editor.com (http://keyboard-layout-editor.com) and http://kalerator.clueboard.co/ (http://kalerator.clueboard.co/).

I had submitted my schematic on the site a week or so ago for some feedback and have made some adjustments based on the feedback I had gotten. I've attached images of the schematic and PCB at the bottom of the post.

I ended up modifying the AlpsCherry library for Eagle that I grabbed off of GitHub to have SMD LED's instead of the through hole ones that were there by default. I was looking at using these LEDs: link (http://www.digikey.com/product-detail/en/lite-on-inc/LTST-C191KRKT/160-1447-1-ND/386836)

Are those typically the surface mount LEDs that people use, or am I looking at the wrong ones? I'm looking at just having a single color on the board at this time.

I'd appreciate it if someone could give me feedback on if I should adjust anything on the PCB layout and how I should go about connecting the LEDs to the board. I currently have 3 i/o pins that are not being used on the board. I was thinking about using one of the i/o pins to control the LED's with the use of a switching FET, but wasn't sure if that was the right approach.

Schematic
(http://i.imgur.com/ivkjg2W.png)

Microcontroller on PCB
(http://i.imgur.com/1VaFdz2.png)

Full PCB
(http://i.imgur.com/1qJQK3U.png)
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sun, 15 January 2017, 02:41:59
https://github.com/ruiqimao/keyboard-pcb-guide#setting-up
A guy on r/MK did this and it is really nice. https://www.reddit.com/r/MechanicalKeyboards/comments/5nzpd2/guide_how_to_make_your_own_keyboard_pcb/
It is indeed, but I have a question about a specific part of this tutorial.

(https://camo.githubusercontent.com/0871b4ac44ae7515f3f92546f47359ae366f0903/68747470733a2f2f7075752e73682f746c50366f2f643666363537636162352e706e67)
This is where he connects the VBUS to the VCC pins of the MCU; If I get it right, he's connecting the VBUS to the Pin #2 through the capacitor C7 and the other pins are connected through the Pin #2.
It is my understanding that it's a bad practise because the pins receive the current before the capacitor making the decoupling effect minimal or non existant at all.

Would please someone enlighten me?
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 16 January 2017, 15:56:48
...receive the current before the capacitor making the decoupling effect minimal or non existant at all.

Nah, that doesn't matter. I think you should see the pin as sitting at a certain voltage level. When the pin consumes charge the voltage drops if there is not enough supply coming through. All traces have some impedance (stopping power to currents/current changes). Long traces more so than short traces. To make sure the voltage on the pins doesn't drop when it eats away on those electrons (especially in high spree short bursts) you want a nice buffer real close by, within grabbing distance. If the electron passes by you on their way into the buffer or not doesn't really matter, it just needs to be close.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Mon, 16 January 2017, 16:07:09
...receive the current before the capacitor making the decoupling effect minimal or non existant at all.

Nah, that doesn't matter. I think you should see the pin as sitting at a certain voltage level. When the pin consumes charge the voltage drops if there is not enough supply coming through. All traces have some impedance (stopping power to currents/current changes). Long traces more so than short traces. To make sure the voltage on the pins doesn't drop when it eats away on those electrons (especially in high spree short bursts) you want a nice buffer real close by, within grabbing distance. If the electron passes by you on their way into the buffer or not doesn't really matter, it just needs to be close.
So would you recommend connecting all the power pins to each other? Underneath the IC maybe?

In a two layers board, is it a good practise to have one a GND plane and the other a power plane? Perhaps a smaller power plane (I think it's called polygon pour) just around the IC?

Excuse all the questions but you do give the good advices and I need them.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 16 January 2017, 16:39:17
If you want a truly educated answer you should probably ask at another forum...

I think the recommendation for a two layer board would be to use both sides for GND pour and route power rails individually to pins, stitching the GND plane together generously to maintain short return paths. You probably want to avoid making loops of copper, loops pick up EMI (and emits it). De-coupling at all pins for sure (On a board with separate power planes I believe the consensus is that it's not quite as essential). Some components may have thermal pads which connect to VCC. In that case you need to make local VCC pours, of course.

Loop area that is. You don't want a lot of open space fully enclosed by a conductor. The induced current is equal to the change in magnetic flux, which in turn is proportional to the magnetic field multiplied by the enclosed area. In other words, a thin slot for routing another net doesn't count for much.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Mon, 16 January 2017, 17:10:31
GND pour on both sides is what I was doing and I guess I'll stick to that. If I get what you said right, I guess I have to keep the power traces as short as possible.
I'll surely nag you (all) with more questions in the future. Thank you very much for the time being, you're really helpful.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Tue, 17 January 2017, 00:31:11
It's always good to keep traces short (except in cases where you use properties of the trace itself, like with impedance matching and such). Since power rails are at a constant level they should probably be your least concern lengthwise, as long as they are properly decoupled. The traces between pins and decoupling capacitors are the ones you want to keep short and straight.

There's probably a bunch of general rules to take into account, times they matter more, and times they matter less (like with keyboards that are just very slow). The higher frequency you shift things around with the tricker things get. The USB signals is probably the only place you'd possibly need to take some care, but I think that at the low speed needed for keyboards you should be easy off with just about anything.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Tue, 17 January 2017, 14:45:01
Thanks for all your insights. I owe you a pizza.
Title: Re: The Living PCB Design Thread
Post by: krownedk1ng on Fri, 20 January 2017, 19:49:53
Hi everyone,

I'm looking at getting some feedback on my PCB and schematic design that I've been working on. The PCB was laid out by using http://keyboard-layout-editor.com (http://keyboard-layout-editor.com) and http://kalerator.clueboard.co/ (http://kalerator.clueboard.co/).

I had submitted my schematic on the site a week or so ago for some feedback and have made some adjustments based on the feedback I had gotten. I've attached images of the schematic and PCB at the bottom of the post.

I ended up modifying the AlpsCherry library for Eagle that I grabbed off of GitHub to have SMD LED's instead of the through hole ones that were there by default. I was looking at using these LEDs: link (http://www.digikey.com/product-detail/en/lite-on-inc/LTST-C191KRKT/160-1447-1-ND/386836)

Are those typically the surface mount LEDs that people use, or am I looking at the wrong ones? I'm looking at just having a single color on the board at this time.

I'd appreciate it if someone could give me feedback on if I should adjust anything on the PCB layout and how I should go about connecting the LEDs to the board. I currently have 3 i/o pins that are not being used on the board. I was thinking about using one of the i/o pins to control the LED's with the use of a switching FET, but wasn't sure if that was the right approach.

Schematic
Show Image
(http://i.imgur.com/ivkjg2W.png)


Microcontroller on PCB
Show Image
(http://i.imgur.com/1VaFdz2.png)


Full PCB
Show Image
(http://i.imgur.com/1qJQK3U.png)


Would someone be able to give me some feedback regarding how hook up the LED backlighting in my schematic? I have 3 i/o ports still available and was initially thinking about creating a couple zones of LEDs, which would get PWM'd on and off using some kind of a FET [I was thinking a dual channel FET to control both zones]. Is that the right way to do it? Or is there a better way to approach this? Thanks
Title: Re: The Living PCB Design Thread
Post by: 27.9.2016 on Mon, 23 January 2017, 14:57:08
What do you thing does it look good? I am planning on etching this PCB by myself with UV process  ;D

It looks alright, it looks auto-routed.. You could clean up a few wacky vias around the Teensy. With a little bit of effort you could probably straighten a few more things out by re-arranging some more. But on the other hand it will surely work, and time can be spent better =) If you etch at home you may want to increase the trace widths to add some extra margin.

If you're not etching a double sided board you may also want to try to move more of the traces to the same side. I would put all traces around the Teensy on the bottom. Otherwise it will be hard to solder (on a single sided board). The long straight horizontal traces would be easily made from jumper wires, if on the back.. I can't say straight that it's feasible to "reverse" the layers like this, that would take some more experimenting. Silly me, jumpers can of course be placed anywhere =P Also drilling PCB laminates is a b****, and you need to be very accurate for the switches to sit straight. And you need really good alignment if you're doing a double sided board. But hey you'll be really pleased with yourself once you finish =D

To save etchant you can also add copper fills, just make sure they are connected to something (GND preferably) and not floating free. That probably wouldn't impede functionality much in this case, but it's considered bad practice..


First result of etching. I still have to clean traces, trim edges and the most fun part drill holes  :))

Bottom:
(http://i.imgur.com/bt7yAzo.jpg)

Top:
(http://i.imgur.com/T2zp74p.jpg)
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 23 January 2017, 16:18:43
Quote from: krownedk1ng
I'd appreciate it if someone could give me feedback on if I should adjust anything on the PCB layout

You probably want to increase the GND zone clearance. It may be just fine, but it looks really tight, especially since you've used a lot more clearance for everything else.

Where are your decoupling capacitors? They should be right up as close as possible to the 5V pins, one per pin preferably.
Title: Re: The Living PCB Design Thread
Post by: krownedk1ng on Mon, 23 January 2017, 18:08:23
Quote from: krownedk1ng
I'd appreciate it if someone could give me feedback on if I should adjust anything on the PCB layout

You probably want to increase the GND zone clearance. It may be just fine, but it looks really tight, especially since you've used a lot more clearance for everything else.

Where are your decoupling capacitors? They should be right up as close as possible to the 5V pins, one per pin preferably.

I had them connected near the USB port before the 0.5A fuse. I changed up my schematic to have them now be located after the fuse.

New IC layout
More
(http://i.imgur.com/G5wVZaN.png)

I also set the GND plane isolation to 0.012" [initially set at .005"]

Let me know what you think.
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Mon, 23 January 2017, 20:04:24
Quote from: krownedk1ng
I'd appreciate it if someone could give me feedback on if I should adjust anything on the PCB layout

You probably want to increase the GND zone clearance. It may be just fine, but it looks really tight, especially since you've used a lot more clearance for everything else.

Where are your decoupling capacitors? They should be right up as close as possible to the 5V pins, one per pin preferably.

I had them connected near the USB port before the 0.5A fuse. I changed up my schematic to have them now be located after the fuse.

New IC layout
More
Show Image
(http://i.imgur.com/G5wVZaN.png)

I also set the GND plane isolation to 0.012" [initially set at .005"]

Let me know what you think.
Those traces are NSFW ugh.

sent from my chess board

Title: Re: The Living PCB Design Thread
Post by: krownedk1ng on Mon, 23 January 2017, 20:47:38
Quote from: krownedk1ng
I'd appreciate it if someone could give me feedback on if I should adjust anything on the PCB layout

You probably want to increase the GND zone clearance. It may be just fine, but it looks really tight, especially since you've used a lot more clearance for everything else.

Where are your decoupling capacitors? They should be right up as close as possible to the 5V pins, one per pin preferably.

I had them connected near the USB port before the 0.5A fuse. I changed up my schematic to have them now be located after the fuse.

New IC layout
More
Show Image
(http://i.imgur.com/G5wVZaN.png)

I also set the GND plane isolation to 0.012" [initially set at .005"]

Let me know what you think.
Those traces are NSFW ugh.

sent from my chess board

Anything in particular that doesn't look right with the traces?
Title: Re: The Living PCB Design Thread
Post by: mrbishop on Mon, 23 January 2017, 20:57:56
Quote from: krownedk1ng
I'd appreciate it if someone could give me feedback on if I should adjust anything on the PCB layout

You probably want to increase the GND zone clearance. It may be just fine, but it looks really tight, especially since you've used a lot more clearance for everything else.

Where are your decoupling capacitors? They should be right up as close as possible to the 5V pins, one per pin preferably.

I had them connected near the USB port before the 0.5A fuse. I changed up my schematic to have them now be located after the fuse.

New IC layout
More
Show Image
(http://i.imgur.com/G5wVZaN.png)

I also set the GND plane isolation to 0.012" [initially set at .005"]

Let me know what you think.
Those traces are NSFW ugh.

sent from my chess board

Anything in particular that doesn't look right with the traces?
I was trying to say the looked really good and neat. Ignore me

sent from my chess board

Title: Re: The Living PCB Design Thread
Post by: krownedk1ng on Mon, 23 January 2017, 21:01:51
Quote from: krownedk1ng
I'd appreciate it if someone could give me feedback on if I should adjust anything on the PCB layout

You probably want to increase the GND zone clearance. It may be just fine, but it looks really tight, especially since you've used a lot more clearance for everything else.

Where are your decoupling capacitors? They should be right up as close as possible to the 5V pins, one per pin preferably.

I had them connected near the USB port before the 0.5A fuse. I changed up my schematic to have them now be located after the fuse.

New IC layout
More
Show Image
(http://i.imgur.com/G5wVZaN.png)

I also set the GND plane isolation to 0.012" [initially set at .005"]

Let me know what you think.
Those traces are NSFW ugh.

sent from my chess board

Anything in particular that doesn't look right with the traces?
I was trying to say the looked really good and neat. Ignore me

sent from my chess board

In that case, thank you very much.
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Fri, 03 February 2017, 17:03:29
If I want to use a Teensy 2.0 instead of a SMD, how would I connect a mini USB on my PCB to a Teensy 2.0?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sat, 04 February 2017, 02:24:21
If I want to use a Teensy 2.0 instead of a SMD, how would I connect a mini USB on my PCB to a Teensy 2.0?
Predispose a USB connector and a header with 5 pads on your PCB, cut a USB mini cable on the type-A end and solder it to the header, finally connect the Mini-B end to the Teensy.
The picture below should give you the idea.

(click to enlarge)
(http://i.imgur.com/ZW1KWy6.jpg)
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Sat, 04 February 2017, 21:20:47
If I want to build a breakout board for USB-A. Do the mounting (left and right) have to be connected to anything?
Title: Re: The Living PCB Design Thread
Post by: pomk on Sun, 05 February 2017, 05:20:09
Not really. According to spec you could connect them to the casing of the keyboard, but no one seems to be doing that.
Title: Re: The Living PCB Design Thread
Post by: stoic-lemon on Mon, 06 February 2017, 07:03:08
Hi all. I've come up with this schematic after reading this thread and following a couple of tutorials. I'm just looking for some more experienced eyes to take a look at it and tell me if I've made any mistakes. I'm worried about the fact that I've used all the pins on the controller, and if my diodes are placed correctly, that kind of thing.

(http://i.imgur.com/iqq6PMU.png)

(http://i.imgur.com/JDwHCb8.png)
Title: Re: The Living PCB Design Thread
Post by: skullydazed on Mon, 06 February 2017, 09:55:17
You probably shouldn't connect the USB shield to GND, or if you do it should be through a cap and something like a 10M resistor. This is to avoid emitting unwanted RFI.

You've copied an extremely common pattern by putting all your decoupling caps off to the side, but as a general pattern I do not like to do this. It makes it difficult to determine where each one is intended to go. For example, what is C7's purpose? Instead I think it's better to have every passive component connected with a wire on the schematic, to make your intended placement/purpose obvious.

Otherwise looks like a great start!
Title: Re: The Living PCB Design Thread
Post by: stoic-lemon on Mon, 06 February 2017, 17:25:45
I really appreciate you taking a look and giving me feedback. I have nobody else to ask about this stuff lol. I'll take some time to digest what you said and make some changes. Thanks again.

Edit: After doing some research and learning a lot. I updated my schematic. I totally get what you mean about the previous one not being very good, especially for a novice like myself. When it comes to routing traces, I'll be glad I (attempted) to do it right so I understand a little better what is going on.

Altered the decoupling capacitors to show how they will connect. I'm really not sure this is right though.

It seems that the issue of the shield and hooking it to ground is a contentious one. I've followed what I think to be the safest advice, which matches what skullydazed said. Or at least I've tried to as it looks like I forgot to change the value of the resistor for the shield  :( .

(http://i.imgur.com/LmeTgHh.png)
Title: Re: The Living PCB Design Thread
Post by: CthulhuMart on Wed, 08 February 2017, 21:44:44
Can I get a sanity check on what I've got so far? It's a 40% form factor, ATMEGA32U4 chip, I'm a bit confused with the whole SMD stuff. I've used the SOD-523 footprint as they're smaller and hence give me more space to play around with for routing (I haven't started that yet.

Aside from that, is there anything glaringly wrong with what I've got?

Thanks!
CM.
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Sat, 11 February 2017, 00:50:48
For the shield to GND for the USB, what power rating resistors would I need in mW? Also, for the capacitor in the shield to GND for the USB, what VDC would I need? Are there any recommendations for those resistors and capacitors? They're 10KΩ 0603 resistors and 2.7µF 0603 capacitor?
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sun, 12 February 2017, 05:57:20
For the USB shield there seem to be as many different recommendations as there are possible ways to combine resistor/capacitor/inductor networks or directly tie it to GND or floating. It's hard to tell what to use when/where/why.

Decoupling capacitors. Apparently that is a science of it's own with its fair share of hand wavering "rules". I found this thread (http://electronics.stackexchange.com/questions/15135/decoupling-caps-pcb-layout) with an interesting discussion. The answer by Connor Wolf at least makes a compelling argument that there is a difference between the different ways to hook them up. I'm pretty sure that at our low speed digital circuits the via placements are far from critical.
Title: Re: The Living PCB Design Thread
Post by: replicaJunction on Thu, 16 February 2017, 09:05:03
I apologize if this is a really stupid question, but I've been searching for a couple weeks and haven't found an answer. This is the biggest thing holding me back from a custom PCB design.

Is there a good KiCad footprint somewhere for a TRRS jack (and a corresponding part number to make sure I get the right one)?
Title: Re: The Living PCB Design Thread
Post by: stoic-lemon on Thu, 16 February 2017, 09:57:19
Not sure if this is 'the' one, but http://www.cui.com/product/resource/sj-4351x.pdf (http://www.cui.com/product/resource/sj-4351x.pdf) You could try your hand at making a footprint in KiCad.
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Thu, 16 February 2017, 17:07:50
I apologize if this is a really stupid question, but I've been searching for a couple weeks and haven't found an answer. This is the biggest thing holding me back from a custom PCB design.

Is there a good KiCad footprint somewhere for a TRRS jack (and a corresponding part number to make sure I get the right one)?
You may want to ask u/wootpatoot on Reddit, he made a PCB with a TRRS jack. He could probably give you a footprint.
Title: Re: The Living PCB Design Thread
Post by: layornos on Sat, 18 February 2017, 12:12:35
Dear all,

i want to use I2C as communication protocoll for a split keyboarrd.  As i understand, i need two 4,7k resistors like in this schematic:
[attach=1]

At the moment, the routing and schematic looks like this:
[attach=2]
[attach=3]

Regards
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Sat, 18 February 2017, 23:09:59
Hey, if I want to use RGBW LEDs, how would I limit the power through USB 2.0? I am going to use 40 key switches and 40 RGBW LEDs.
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Sun, 19 February 2017, 15:04:39
Are there USB C 3.1 through hole KiCad footprints that work with something like this (http://www.digikey.com/product-detail/en/mill-max-manufacturing-corp/898-43-024-90-310000/ED1391CT-ND/5213140)?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sun, 19 February 2017, 15:17:50
Are there USB C 3.1 through hole KiCad footprints that work with something like this (http://www.digikey.com/product-detail/en/mill-max-manufacturing-corp/898-43-024-90-310000/ED1391CT-ND/5213140)?
Like this (https://github.com/manisteinn/usb-type-c-kicad-lib)?
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Sun, 19 February 2017, 16:24:38
Are there USB C 3.1 through hole KiCad footprints that work with something like this (http://www.digikey.com/product-detail/en/mill-max-manufacturing-corp/898-43-024-90-310000/ED1391CT-ND/5213140)?
Like this (https://github.com/manisteinn/usb-type-c-kicad-lib)?
I already downloaded that, they're SMD, not through hole. Thank you anyway.
Title: Re: The Living PCB Design Thread
Post by: Criterus on Tue, 21 February 2017, 23:29:46
Does anyone current links for Kicad to the MX switch and the teensy 2.0 boards? I've downloaded a couple of libs and mods files most of them 2-3 years old and haven't had much luck making it from the Eeschema to PCBnew in Kicad. Its highly likely I'm doing something wrong, but I'd like to at least verify that I have the right/current parts installed to tinker on this software.
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Thu, 23 February 2017, 15:21:06
Does anyone current links for Kicad to the MX switch and the teensy 2.0 boards? I've downloaded a couple of libs and mods files most of them 2-3 years old and haven't had much luck making it from the Eeschema to PCBnew in Kicad. Its highly likely I'm doing something wrong, but I'd like to at least verify that I have the right/current parts installed to tinker on this software.
On Reddit, search up The Keebrary.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sun, 26 February 2017, 10:30:05
I have a silly question but I rather be safe than sorry.
What's the correct wiring sequence?
MCU - Crystal - Capacitors or MCU - Capacitors - Crystal?
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sun, 26 February 2017, 23:51:42
I have a silly question but I rather be safe than sorry.
What's the correct wiring sequence?
MCU - Crystal - Capacitors or MCU - Capacitors - Crystal?

I've seen both, and I don't think it matters too much. But it may be like with the bypass caps - there's a correct way to do it which will matter in extreme cases.. There's no reference design for the MCU in question?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Mon, 27 February 2017, 04:45:23
There's no reference design for the MCU in question?
The MCU is our earnest friend ATMega32u4, I have seen different approaches for this, even forking the trace from the MCU pins equally to crystal and capacitors, yet I'm unsure about the correct way to do it, if it even matters.
The datasheet doesn't seem to tell anything about this and I haven't found any CAD example.
Title: Re: The Living PCB Design Thread
Post by: pomk on Mon, 27 February 2017, 05:33:31
Atmel has some application guides on this topic. http://ww1.microchip.com/downloads/en/AppNotes/Atmel-8128-Best-Practices-for-the-PCB-Layout-of-Oscillators_ApplicationNote_AVR186.pdf

The one pcb layout they actually show is not even symmetric, but does have caps before the crystal.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Mon, 27 February 2017, 05:39:52
Thanks pomk. Must have missed that pdf, and you've already posted it once, my bad forgetting it.

So you would personally put capacitors between MCU and crystal?
Title: Re: The Living PCB Design Thread
Post by: pomk on Mon, 27 February 2017, 05:43:47
I usually follow the schematic, putting caps after the crystal. How the different sample pcb layouts have been crafted varies between chip manufacturers.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Mon, 27 February 2017, 06:22:59
I usually follow the schematic, putting caps after the crystal.
That was my same thought, although the design guides then states the following:
Quote
The load XTAL-IN capacitor should be placed first and closest to the XTAL-IN pin and ground
I guess I'll do this way and cross my fingers.

Again, thank you.
Title: Re: The Living PCB Design Thread
Post by: pomk on Mon, 27 February 2017, 06:26:59
Any time
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Mon, 27 February 2017, 17:15:28
So for an LED driver, does anyone have an image of an ATMEGA32U4 schematic with a IS31FL3731?
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Wed, 15 March 2017, 18:15:32
What thickness of copper should I get for my PCB? Is there an advantage to get 3 ounces over 1 ounce?
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Thu, 16 March 2017, 01:12:32
What thickness of copper should I get for my PCB? Is there an advantage to get 3 ounces over 1 ounce?

Not unless you need it to handle more current, which you don't on a keyboard (unless it doubles as a hig intensity light source or something..).
Title: Re: The Living PCB Design Thread
Post by: ishtob on Thu, 16 March 2017, 11:23:40
Hi all, its been a while since I posted on the make things forum. I recently started dabbling with type-c connectors for a build. decided that point to point soldering is not a very good idea in the long run as it is hard to reproduce consistent results and more prone to failure if I move this keyboard around a lot. This is what I came up with:

(https://easyeda.com/normal/VERSION1-a139cea9b77e4af69e0bb0b18881f874)

the idea is to use one of these (https://www.digikey.com/product-detail/en/amphenol-commercial-products/MUSBRM5C130/MUSBRM5C130-ND/5877552) as they look like they are built to outlast this century.



Question I bring here today is I am unsure of how to go about connecting the shield. Right now I have it tied directly to ground as this is what I have done with my hand wired build, it does not seem to have any issues and is working properly. Am I just lucky I am not getting any EMI or is this actually acceptable practice in type-C setups?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 16 March 2017, 11:29:01
Hi and welcome back,
I am unsure of how to go about connecting the shield.

For the USB shield there seem to be as many different recommendations as there are possible ways to combine resistor/capacitor/inductor networks or directly tie it to GND or floating. It's hard to tell what to use when/where/why.

Also, your EasyEDA link is broken, it points to their logo.
Title: Re: The Living PCB Design Thread
Post by: ishtob on Thu, 16 March 2017, 11:34:51
Hi and welcome back,
I am unsure of how to go about connecting the shield.

For the USB shield there seem to be as many different recommendations as there are possible ways to combine resistor/capacitor/inductor networks or directly tie it to GND or floating. It's hard to tell what to use when/where/why.

Also, your EasyEDA link is broken, it points to their logo.


forgot to set it to public, try now
Title: Re: The Living PCB Design Thread
Post by: ishtob on Thu, 16 March 2017, 13:07:22
well, if anyone is adventurous enough and have a device with a type-c plug, let me know, I ordered a couple more since it costs the same. I will send you one of these with the USB port attached to test it out type-c to type-c
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Tue, 04 April 2017, 21:33:40
Is this right?
Title: Re: The Living PCB Design Thread
Post by: pomk on Tue, 04 April 2017, 23:50:09
Depending on the uC it might. Difficult to say if it is not given.
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Wed, 05 April 2017, 08:41:27
ATMEGA32U4
Title: Re: The Living PCB Design Thread
Post by: anson-IT on Thu, 06 April 2017, 01:55:22
How to export GERBER files from Eagle CAD (in under 2 minutes) (https://www.youtube.com/watch?v=oXWwHbusicM&lc=z13if1qwcue1dhmla232dj0zfyrqsty25.1488896218890063)
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Thu, 06 April 2017, 18:37:08
Will this work for the ATMEGA32U4 instead of using Capacitors and a crystal. https://www.digikey.com/product-detail/en/murata-electronics-north-america/CSTCE16M0V13L99-R0/490-7851-1-ND/4380182
Also, does anyone know if the datasheet has the PCB footprint drawing flipped or flipped and rotated? Also, are  the pins shorted?
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Thu, 06 April 2017, 19:38:34
Also, what fuses should I use for USB 2.0?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Fri, 07 April 2017, 05:25:53
Will this work for the ATMEGA32U4 instead of using Capacitors and a crystal.
You do need capacitors for either crystal and ceramic resonator. Read this (http://www.atmel.com/Images/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf) from chapter 6.2 on.

Quote from: HeroXLazer
Also, what fuses should I use for USB 2.0?
Check the previous link at chapter 28.2. There's no fuse bits to set for USB (as far as I can read).
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Fri, 07 April 2017, 08:36:57
What if I use a ceramic resonator with capacitors built in?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Fri, 07 April 2017, 08:50:30
What if I use a ceramic resonator with capacitors built in?
That could work, yet many prefer using crystals over ceramic resonators for the latter tend to be less precise. I'm not really an expert in that regard, so I just follow general recommendations.
Title: Re: The Living PCB Design Thread
Post by: pomk on Mon, 10 April 2017, 07:49:28
Is this right?
I'm not sure if the pull-up on the reset pin is necessary, though even should it be so it won't break anything.
The caps next to the crystal seem a bit high valued, but of course they just have to match with the crystal itself.
You have a bit high total capacitance on the vbus, I believe that anything past 1µ would not pass USB spec.
The USB shield should be connected to the keyboard chassis, while what you have in place will work I'm not sure of the purpose you have for those components.


Will this work for the ATMEGA32U4 instead of using Capacitors and a crystal. https://www.digikey.com/product-detail/en/murata-electronics-north-america/CSTCE16M0V13L99-R0/490-7851-1-ND/4380182
Also, does anyone know if the datasheet has the PCB footprint drawing flipped or flipped and rotated? Also, are  the pins shorted?
That might work, though it is difficult for me to see the point of it. Crystal and two caps will cost less and has been proven to work well with the µC you have chosen.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 10 April 2017, 09:10:06
Resonators are supposedly not accurate/stable enough to support hi-speed USB. There's a built in resonator in the ATmega, if you want to use a resonator you may just use that.

I've always used 18pf caps for the crystal I use. Never analyzed the function further, but it seem to work. This completely depend on the crystal though. Atmel has some application sheet on crystal and caps.

I think a maximum of 10µF is what USB allows without inrush limitation. You would probably get away with slightly more.

There's all kind of recommendations on how to connect the shield and GND. I'll stay out of that discussion...
Title: Re: The Living PCB Design Thread
Post by: pomk on Mon, 10 April 2017, 09:59:16
ah, my mistake there. Anything between 1 and 10 µF should be fine.
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Mon, 10 April 2017, 16:58:48
So what about now?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 12 April 2017, 04:44:54
It looks fine, although that 22 Ohm resistor on the USB shield looks odd to me. I've seen recommendations to put a 4.7uF capacitor in parallel with 1 MOhm resistor but never a 22 Ohms.
Also, are you using PE2 as general I/O pin or as HWB? Because, for the latter, most people add a 1 KOhm resistor to it.
Lastly, out of curiosity, why are you adding a fuse on the VBUS rail?
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Wed, 12 April 2017, 08:35:37
I looked at other posts, and they all seemed to have 22Ω on the shield. HWB has a resistor on it. I have a fuse as circuit protection.
Title: Re: The Living PCB Design Thread
Post by: PancakeMSTR on Thu, 13 April 2017, 16:22:58
I have a question: Can I use a surface mount Atmega32U4 in lieu of a Teensy 2.0 in a custom design I'm working on? Which Atmega should I use? Do I need to get anything else? Will it retain all the important functionality of the Teensy 2.0., e.g. compatibility with TMK or QMK (I don't know the difference between these) firmware?

For example, is this the same chip as is on the Teensy 2.0: https://www.digikey.com/product-detail/en/microchip-technology/ATMEGA32U4-AUR/ATMEGA32U4-AURCT-ND/3440960

Thanks.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 13 April 2017, 17:05:09
Can I use a surface mount Atmega32U4 in lieu of a Teensy 2.0 in a custom design I'm working on?
You can surely do, but the MCU alone won't suffice. You can read the whole thread (trust me, it won't take much) to see how other users accomplished that. Also, the datasheet (http://www.atmel.com/Images/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf) is your friend.

Which Atmega should I use?
Either ATMega32u4 and AT90USB1286 (found on Teensy++ 2.0) are supported by TMK.

Do I need to get anything else?
A SPI programmer (http://www.fischl.de/usbasp/) helps for most MCUs are blank and you need to flash the bootloader yourself. Some come already flashed but, the ones I found, they cost unreasonably more.

Will it retain all the important functionality of the Teensy 2.0., e.g. compatibility with TMK or QMK (I don't know the difference between these) firmware?
Not quite. You won't be able to use the TeensyLoader because the HalfKey bootloader is proprietary and not public. However, Grendel (https://deskthority.net/workshop-f7/bootloaders-t7608.html#p153776) wrote a bootloader compatible with the TeensyLoader, you can ask him for the source.
Both TMK and QMK will work with the 32u4.

is this the same chip as is on the Teensy 2.0: https://www.digikey.com/product-detail/en/microchip-technology/ATMEGA32U4-AUR/ATMEGA32U4-AURCT-ND/3440960
Same chip, different form factor. The pins on the MU variant (https://cdn.sos.sk/productdata/11/91/69/119169/Zbo_119169.jpg) (the one found on the Teensy) are only exposed on the bottom side of the chip. The pins on the AU variant (https://cdn.sparkfun.com//assets/parts/6/7/0/1/11181-02.jpg) (the one you linked) are accessible from the sides which takes a bit more room but they are definitely easier to solder.
Title: Re: The Living PCB Design Thread
Post by: PancakeMSTR on Thu, 13 April 2017, 17:16:39
Can I use a surface mount Atmega32U4 in lieu of a Teensy 2.0 in a custom design I'm working on?
You can surely do, but the MCU alone won't suffice. You can read the whole thread (trust me, it won't take much) to see how other users accomplished that. Also, the datasheet (http://www.atmel.com/Images/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf) is your friend




Right, I figured, but I'm having trouble understanding what else I need. There are a lot of surface mount components that I don't understand the purpose of on the Teensy. The basic idea here, I guess, is to replicate a (the necessary parts of) a Teensy on the PCB.

I am reading this thread, and researching stuff on my own, but I could definitely use direction, and would greatly appreciate it. I'm working on this on my own of course, but I'm nonetheless flailing about. I've never done this before.


So, supposing I use the surface mount atmega, I need to put a bootloader on it and program it. What software can I use to program it? Can I just use arduino software? How difficult is what I'm proposing here?


Is there a tutorial for designing a PCB with an integrated controller?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 13 April 2017, 17:42:18
I'm having trouble understanding what else I need. There are a lot of surface mount components that I don't understand the purpose of on the Teensy. The basic idea here, I guess, is to replicate a (the necessary parts of) a Teensy on the PCB.
Sure, replicating the Teensy is a good way to start. Its schematic (https://www.pjrc.com/teensy/schematic2.gif) will greatly help you in the process.

I am reading this thread, and researching stuff on my own, but I could definitely use direction, and would greatly appreciate it. I'm working on this on my own of course, but I'm nonetheless flailing about. I've never done this before.
Here are two ([1] (https://easyeda.com/feather/32u4_Breakout_Board-kR31nl5Oa) [2] (https://easyeda.com/Selina/Atmega32U4_Breakout_Board-pX975E0YW)) ATMega32u4 breakout boards that you can examine to get an idea.

So, supposing I use the surface mount atmega, I need to put a bootloader on it and program it. What software can I use to program it?
avrdude (http://www.nongnu.org/avrdude/) to flash the bootloader, then, depending on the bootloader you choose, there's a number of different softwares for flashing firmwares, namely FLIP (http://www.atmel.com/tools/flip.aspx) and dfu-programmer (https://dfu-programmer.github.io/).
Title: Re: The Living PCB Design Thread
Post by: PancakeMSTR on Thu, 13 April 2017, 18:04:33
I'm having trouble understanding what else I need. There are a lot of surface mount components that I don't understand the purpose of on the Teensy. The basic idea here, I guess, is to replicate a (the necessary parts of) a Teensy on the PCB.
Sure, replicating the Teensy is a good way to start. Its schematic (https://www.pjrc.com/teensy/schematic2.gif) will greatly help you in the process.

Okay, but is it the best approach? Is there a simple approach? I'm not trying to replicate a teensy perfectly, I'm trying to integrate the microcontroller on the PCB. I.e., everything surface mount, no breakout boards.


Let me just clarify here. Please understand I'm already way over my head. I find this stuff really confusing. Anyway here's an outline:



Hang on a moment I'm gonna make a picture from the Teensy schematic to try and illustrate where I am here.


Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Fri, 14 April 2017, 06:19:36
Okay, but is it the best approach? Is there a simple approach?
There's no absolute best or simple approach. There are best and simple approaches to different situations. It really depends on your layout.

Slapping an Atmega 32u4 on a PCB and wiring rows and columns to it won't just work, right?
Right.

So what other components does it need to function and where do they go?
The datasheet will tell you everything you need to know but, since most users have already gone through that and PCB design, you'll find most of those informations spread out in this thread (and others).

what are the functions of the components? What do I need to include and what do I not need to include?
Different componets do different things. Capacitors, for example, store energy for the MCU. You need to include what the datasheet suggests. Again, call me pedantic, but sticking to the design rules is enough to start with.
For example, the datasheet tells you you need 22 Ohms resistors on the USB pins of the MCU. You don't really need to know the reason of the resistors' value. You just need to abide by that because the MCU works that way.

Let's say I've figured the above out. Supposing I've attached a USB connector and plugged it into my computer, what would happen? Naturally having done no programming to the microcontroller I don't expect my computer to realize I've plugged a keyboard in and have everything work. So what do I need to do at this point? My presumption is install the bootloader first. This is accomplished with AVRdude, but apparently bootloader choice effects things? Which bootloader should I choose?
Correct. Nothing will happen because the MCU is blank. Without firmware and bootloader, your board is a nice paperweight. So, you start flashing a bootloader and the choise in that case is yours. There are many and most are listed here (https://deskthority.net/workshop-f7/bootloaders-t7608.html). This guide (https://deskthority.net/wiki/Flashing_bootloaders_on_AVR) will explain you how to flash.

Now that I've flashed the bootloader onto the MC, I have to actually program it. I'd probably do this with FLIP. I've tried to use dfu-programmer before and could make zero sense out of it. But god knows I'll probably have the same luck with FLIP. Anyway, I generate a QMK or TMK firmware on a layout editor, i.e. produce the .hex file, and program it.
Correct.

Where does Grendel come in? Is his bootloader necessary?
No, any other bootloader will do just fine. It was a mere example.

Title: Re: The Living PCB Design Thread
Post by: bpiphany on Fri, 14 April 2017, 13:09:05
Atmel USB capable AVRs come with Atmel's DFU bootloader. As far as I know only the 'R'-versions don't.
Title: Re: The Living PCB Design Thread
Post by: hasu on Fri, 14 April 2017, 15:27:35
I think 'R' means reel package instead of tray. They also come with bootloader probably.
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Fri, 14 April 2017, 22:45:58
I'm now thinking about using the ATMEGA32U2, is this right? It says to connect AVCC to VCC through a low-pass filter, but I think I got it wrong. Could someone check this?
Also, what type of header should I use for the 6 pin ISPAVR breakout? Should I connect the RST pin to the header before the pullup resistor or before the pullup resistor?
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sat, 15 April 2017, 01:11:41
I think 'R' means reel package instead of tray. They also come with bootloader probably.

My mistake, it's RC they are called, ATmega32U4RC-AU rather than just ATmega32U4-AU. The suffix -AU is for TQFP, -MU is for QFN. The RC variants have the fuse set from factory to use the internal oscillator. They can be changed back to use an external crystal, but then you need to flash a bootloader (if you want one).

I'm now thinking about using the ATMEGA32U2, is this right? It says to connect AVCC to VCC through a low-pass filter, but I think I got it wrong. Could someone check this?
Also, what type of header should I use for the 6 pin ISPAVR breakout? Should I connect the RST pin to the header before the pullup resistor or before the pullup resistor?

If you aren't going to use the analog comparators you can just connect AVCC straight to VCC. You want to connect VCC and AVCC to UVCC as well.

You don't need a pull-up on RESET. You don't need the "filter" on the Shield, and you probably don't need the ISP header either.

See the controller part of this for a ATmega32u2 schematic
https://deskthority.net/wiki/File:Costar_Replacement_Controllers_Schematics.PNG
Title: Re: The Living PCB Design Thread
Post by: vvp on Sat, 15 April 2017, 06:02:47
I have ATxmega128A4U-AU and ATxmega64A4U-AU. They both arrived without bootloader.
Maybe the bootloader comes only with ATmega and not with ATxmega.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sat, 15 April 2017, 06:25:17
Maybe the bootloader comes only with ATmega and not with ATxmega.
All the ATMegas I got so far came in blank. I guess it up to the vendor.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sat, 15 April 2017, 08:41:36
Didn't we have this discussion recently?.. From the 32U4 datasheet
Quote
Parts using external XTAL clock are pre-programed with a default USB bootloader

The 500 or so AVRs I've ordered surely came with one. Except the RC ones I had to get when the world was out of the regular...
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sat, 15 April 2017, 09:58:41
Didn't we have this discussion recently?.. From the 32U4 datasheet
Quote
Parts using external XTAL clock are pre-programed with a default USB bootloader

The 500 or so AVRs I've ordered surely came with one. Except the RC ones I had to get when the world was out of the regular...
I'll take this one for good then. I must have missed something.
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Sat, 15 April 2017, 10:50:25
I think 'R' means reel package instead of tray. They also come with bootloader probably.

My mistake, it's RC they are called, ATmega32U4RC-AU rather than just ATmega32U4-AU. The suffix -AU is for TQFP, -MU is for QFN. The RC variants have the fuse set from factory to use the internal oscillator. They can be changed back to use an external crystal, but then you need to flash a bootloader (if you want one).

I'm now thinking about using the ATMEGA32U2, is this right? It says to connect AVCC to VCC through a low-pass filter, but I think I got it wrong. Could someone check this?
Also, what type of header should I use for the 6 pin ISPAVR breakout? Should I connect the RST pin to the header before the pullup resistor or before the pullup resistor?

If you aren't going to use the analog comparators you can just connect AVCC straight to VCC. You want to connect VCC and AVCC to UVCC as well.

You don't need a pull-up on RESET. You don't need the "filter" on the Shield, and you probably don't need the ISP header either.

See the controller part of this for a ATmega32u2 schematic
https://deskthority.net/wiki/File:Costar_Replacement_Controllers_Schematics.PNG
For a keyboard do I need the analog comparators? So, I put a cap on each VCC, and then connect all three of them before the cap? I know I don't need a pull up on reset, but can't the MCU reset by accident a few times without it? I'm just wondering what is the ISP header for? Also, should I connect the shield to the ground, or should I just not connect the shield?
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sat, 15 April 2017, 12:38:05
For a keyboard do I need the analog comparators? So, I put a cap on each VCC, and then connect all three of them before the cap? I know I don't need a pull up on reset, but can't the MCU reset by accident a few times without it? I'm just wondering what is the ISP header for? Also, should I connect the shield to the ground, or should I just not connect the shield?

I've never seen a spurious reset, as far as I know. Given you need to ask, you're not building anything to military or aerospace specifications, so I doubt you need to worry about it.

The only likely thing ISP will give you is the possibility to brick the chip (and maybe fix it again).

You won't use the analog comparator.

Ask the internet about the shield - get fourteen different answers.

Define "before" the cap. Try to find a reference design, or just a working example layout.

Don't forget the pull-down resistor on HWB.
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Sat, 15 April 2017, 14:18:39
Excuse my terrible writing. Also, I was looking through the datasheet, and it says it's highly recommended to put a 10µF capacitor on the VBUS line, should I do that, or should I use a 1µF capacitor? It's on page 189.
Title: Re: The Living PCB Design Thread
Post by: tee-eye on Sat, 15 April 2017, 20:32:01
Was hoping someone could take a peep at my schematic and let me know if anything looks amiss on it?
The USB on the right will be connecting to another half of a keeb.
Let me know if anything looks wrong please :) thanks!!!


More
(http://i.imgur.com/neu00su.png)
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sun, 16 April 2017, 03:07:39
Excuse my terrible writing. Also, I was looking through the datasheet, and it says it's highly recommended to put a 10µF capacitor on the VBUS line, should I do that, or should I use a 1µF capacitor? It's on page 189.

Yes, all VCC's connect "before" like that. Each cap goes as close to the pin as possible.

Since USB specifies 10µF as a maximum and you already have a few farads already across GND-VCC you can drop that to perhaps 4.7µF or 6.3µF (or whatever the common values for caps are). All just to be on the safe side, you would still almost certainly get away with 10µF (or more). As long as you don't go completely Blinkenstein with tons of LEDs you should be fine anyway =)
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Sun, 16 April 2017, 17:14:45
What if I have a ton of LEDs? I'm planning to have 62 RGB LEDs. I was barely able to squeeze them in on the ATMEGA32U2, but I did.
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Mon, 17 April 2017, 22:31:53
For the the Cherry MX switch footprint, I understand how big the drill should be for the two pins, but how big should the actual pad to solder onto be in diameter if the drill is 1.5mm?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Tue, 18 April 2017, 04:16:02
how big should the actual pad to solder onto be in diameter if the drill is 1.5mm?
I use a 100 mil diameter pad with a 60 mil hole and it's large enough to be comfortable to solder.
Title: Re: The Living PCB Design Thread
Post by: hasu on Tue, 18 April 2017, 04:34:04
.
never mind.
Title: Re: The Living PCB Design Thread
Post by: pomk on Tue, 18 April 2017, 08:50:59
Guys, for the the Cherry MX switch footprint, I understand how big the drill should be for the two pins, but how big should the actual pad to solder onto be in diameter if the drill is 1.5mm?
Does not really matter, space on pcb vs. ease of soldering. Take your pick. I have used dia 1,5mm holes with 2mm pad.

Most fabs are happy if the annular ring is larger than 0,15mm. (1,8mm pad for 1,5mm drill)
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 19 April 2017, 05:22:58
A question for you gentlemen: I've read that crystals (oscillators mostly) should be kept outside ground planes. What's your opinion about this? Will ground planes really significantly interfere with crystals? For instance, I'm using 16 MHz through-hole crystals with a ATMega32u4 (how original).
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 19 April 2017, 07:46:34
A question for you gentlemen: I've read that crystals (oscillators mostly) should be kept outside ground planes. What's your opinion about this? Will ground planes really significantly interfere with crystals? For instance, I'm using 16 MHz through-hole crystals with a ATMega32u4 (how original).

I think it's more about keeping the "noise" from the oscillator away from the plane. You ideally want to surround the oscillator circuit with ground, on the sides and below. You then connect this "cage" at a single point to the board ground plane.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 19 April 2017, 08:54:16
Got it. Thanks.
Title: Re: The Living PCB Design Thread
Post by: PancakeMSTR on Thu, 20 April 2017, 14:27:04
Can someone tell me the exact dimensions of a cherry MX footprint? No diode or LED. What size through-hole do I need for the metal leads? How big (diameter) should the copper pad be? What diameter through-hole do I need for the plastic pin in the middle of the bottom of the switches (the one that goes through the PCB, for stability I imagine)?


I can't find these dimensions anywhere.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 20 April 2017, 14:54:29
Can someone tell me the exact dimensions of a cherry MX footprint?
For the copper pad, I use a 100 mil diameter with a 60 mil hole. All the other specifics are in the attached image.
[attachimg=1]
Title: Re: The Living PCB Design Thread
Post by: PancakeMSTR on Thu, 20 April 2017, 15:01:17
Can someone tell me the exact dimensions of a cherry MX footprint?
For the copper pad, I use a 100 mil diameter with a 60 mil hole. All the other specifics are in the attached image.
(Attachment Link)

Great thanks


Wait that doesn't make any sense. 100 mm diameter pad is ENORMOUS. That's like 4 inches.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 20 April 2017, 16:21:13
100 mm diameter pad is ENORMOUS.
It is, but I said mil, not millimeter. A mil is a thousandth of an inch.
Title: Re: The Living PCB Design Thread
Post by: PancakeMSTR on Thu, 20 April 2017, 16:23:58
100 mm diameter pad is ENORMOUS.
It is, but I said mil, not millimeter. A mil is a thousanth of an inch.


ooooh okay okay gotcha.
Title: Re: The Living PCB Design Thread
Post by: tk on Thu, 20 April 2017, 23:36:52
Decided i wanted to try creating a PCB from scratch after realizing how cheaply they could be printed (seems worth it to not have to hand wire). Started to try and learn EasyEDA, then tried my hand at KiCad, only to realized I'd rather start with Illustrator and get the layout exactly how I want (and much more quickly), then learn actual EDA software to match my mockups (or find a kind soul willing to help). Here's my first attempt at getting what i hope is all the pieces i'll need on a board, pre-routing:

(http://i.imgur.com/nwhcEW4.jpg)
Full size image (http://i.imgur.com/nwhcEW4.jpg)

End goal layout here (http://www.keyboard-layout-editor.com/#/gists/ca8432f3e6faceb7da26e403714bddf3).

Controller would be a teensy 2. I haven't started routing traces to the controller as I don't trust i have everything i need and expect that something is way off. The tricky spots for me are the 2u/1u hybrid slots, as I'd really like to be able to use 2u caps other than caps with POS style stems, but also want the flexibility. There are currently have dots for LEDS, but will likely ignore those until I try this on a second board.

Was hoping to get another opinion before i go through the masochistic practice of routing leads by hand?

Thanks for looking.

Title: Re: The Living PCB Design Thread
Post by: ishtob on Fri, 28 April 2017, 15:08:15
I was hoping for a sanity check before I put this onto more PCBs, here is schematic of what I am doing with a keyboard controller using a type-C jack:

(http://i.imgur.com/m7QIOpt.jpg) (http://imgur.com/m7QIOpt)
Title: Re: The Living PCB Design Thread
Post by: farhai on Mon, 01 May 2017, 06:03:45
i want to try make keyboard pcb by my self, but i didnt have any skill for making pcb, i want to learn, but i dont know where i started, can you tell me where i can start?

i have friends, he can make pcb, at geekhack, we use kicad. but my friend use eagle. can u tell where most recommend?

and most people at here using teensy, can i use arduino? coz arduino have more cheap than teensy one, some article says that using arduino is cheapy but hard for flash, if like that what best controller inculding much compatible firmware
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Mon, 31 July 2017, 19:52:40
Hey guys, TalkingTree referred me over here from an isolated post asking for help following the same tutorial I see a lot of beginners here referencing (https://github.com/ruiqimao/keyboard-pcb-guide).

He had recommended I add a 6 pin ISP to flash the atmega32u4, since it looks like more often than not they come blank. I can just direct wire all of the pins between the header and the controller right?

I also wanted to ask after a few noticeable differences between some user's schematics I am curious about, hoping to get some context:

The tutorial advises this:
"add decoupling capacitors for VCC ... and one 4.7uF capacitor for UVcc"
[attachimg=1]

I don't see anyone else including a 7.4uF cap, and I am curious why the author of the tut recommends this

and:

"add a GND symbol to represent ground, and connect everything"
[attachimg=2]

I don't see anyone else using crystals with ground connecting them, what was the thought process here?


And is there any reason the default 6 pin isp is designed like this? With the pins in the schematic box? With a break on the left side of the box?
[attachimg=3]
Title: Re: The Living PCB Design Thread
Post by: hasu on Mon, 31 July 2017, 20:48:48
Hey guys, TalkingTree referred me over here from an isolated post asking for help following the same tutorial I see a lot of beginners here referencing (https://github.com/ruiqimao/keyboard-pcb-guide).

He had recommended I add a 6 pin ISP to flash the atmega32u4, since it looks like more often than not they come blank. I can just direct wire all of the pins between the header and the controller right?

While having ISP header is good practice for development and prototype you can safely omit it if you choose proper variant of the chip. You just should avoid ATmega32u4RC, which is configured for internal RC oscillator, not for external xtal. Other variants should come with USB bootloader.


Quote
I also wanted to ask after a few noticeable differences between some user's schematics I am curious about, hoping to get some context:

The tutorial advises this:
"add decoupling capacitors for VCC ... and one 4.7uF capacitor for UVcc"
(Attachment)

I don't see anyone else including a 7.4uF cap, and I am curious why the author of the tut recommends this
I think(not sure) USB spec requires 10uF at a maximum for capacitance on Vbus 10uF for peripherals but most of any abitrary value cap will work in fact. you don't have to be careful much you can change the cap easily even if it has problem.

Quote
and:

"add a GND symbol to represent ground, and connect everything"
(Attachment)

I don't see anyone else using crystals with ground connecting them, what was the thought process here?
Some of SMD crystals has case terminal pin and grounding it is known as good and common practice in general.

Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Tue, 01 August 2017, 04:08:53
Hey guys, TalkingTree referred me over here from an isolated post asking for help following the same tutorial I see a lot of beginners here referencing (https://github.com/ruiqimao/keyboard-pcb-guide).
He had recommended I add a 6 pin ISP to flash the atmega32u4, since it looks like more often than not they come blank. I can just direct wire all of the pins between the header and the controller right?
While having ISP header is good practice for development and prototype you can safely omit it if you choose proper variant of the chip. You just should avoid ATmega32u4RC, which is configured for internal RC oscillator, not for external xtal. Other variants should come with USB bootloader.
In my experience, m32u4 comes with a set of bit fuses different from what's commonly used, hence I implemented a SPI on my boards, but hasu surely knows better.

I don't see anyone else using crystals with ground connecting them, what was the thought process here?
Most SMD crystals have four pins as you can see here (http://en3img.allhaving.com/upload/2640/o/14_7_smd_crystal_1.jpg). Usually the odd ones are for the crystal pins and the even ones are for ground, but always check the manufacturer's datasheet.

And is there any reason the default 6 pin isp is designed like this? With the pins in the schematic box? With a break on the left side of the box?
(Attachment Link)
That break is to match the connector (http://www.atmel.com/webdoc/avrdragon/images/image11.jpg). You can use a different standard but label your header accordingly.

Edit: quoting mess.
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Tue, 01 August 2017, 18:18:16
Awesome, thanks for the information guys, Would be completely lost without you.

My PCB is turning out to be a lot more complicated than I had initially realized and I am straying a bit from the tutorial, once I get everything laid out I will post it to get some experienced eyes to review it
Title: Re: The Living PCB Design Thread
Post by: _haru on Wed, 02 August 2017, 00:36:59
Can I use Fritzing to design a 60% PCB? All diodes will be through-hole, no LEDs.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 02 August 2017, 01:17:21
Can I use Fritzing to design a 60% PCB? All diodes will be through-hole, no LEDs.
You can should use any software you're the most comfortable with. I personally tried with Fritzing to no avail and ended up feeling great with EasyEDA (https://easyeda.com). Also check komar's OP for some info about Kicad.
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Wed, 02 August 2017, 03:08:31
Does it matter which key in a column I connect the trace back to the controller? Does each column need to connect back to the controller on the same row?

And do I need to connect any of the ground pads on resistors/xtal/buttons to any of the ground pins on the controller?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 02 August 2017, 03:39:28
Does it matter which key in a column I connect the trace back to the controller? Does each column need to connect back to the controller on the same row?
No to both questions.

And do I need to connect any of the ground pads on resistors/xtal/buttons to any of the ground pins on the controller?
You can use ground planes but I prefer to route ground traces anyway, but I guess it's just me. If you don't use ground planes then yes, you have to connect ground pads to ground pins of the controller and to the USB connector's ground.
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Wed, 02 August 2017, 03:51:24
And do I need to connect any of the ground pads on resistors/xtal/buttons to any of the ground pins on the controller?
You can use ground planes but I prefer to route ground traces anyway, but I guess it's just me. If you don't use ground planes then yes, you have to connect ground pads to ground pins of the controller and to the USB connector's ground.

The tutorial has us use a ground plane, do I need to do anything to connect ground pads/pins to that plane?

Edit: I ended up tracing them all together anyways. Ended up with more vias than probably looks good, but I figure it's less of an issue for grounds. I would love to have one or two people look over it for me, but I'm unsure what the best way to go about that is..?
Title: Re: The Living PCB Design Thread
Post by: _haru on Wed, 02 August 2017, 04:22:48
Quote
You can should use any software you're the most comfortable with. I personally tried with Fritzing to no avail and ended up feeling great with EasyEDA (https://easyeda.com). Also check komar's OP for some info about Kicad.

I see. Thanks for that, will try. KiCad seems very difficult to learn, though  :confused:
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 02 August 2017, 05:25:17
The tutorial has us use a ground plane, do I need to do anything to connect ground pads/pins to that plane?
No.

Ended up with more vias than probably looks good, but I figure it's less of an issue for grounds.
It is recommended to avoid vias for USB traces and capacitors, other than those, you could use as many as you want.

I would love to have one or two people look over it for me, but I'm unsure what the best way to go about that is..?
Either posting pictures of particular areas you want to be checked, or share the entire project, if you're comfortable with that.
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Wed, 02 August 2017, 18:13:06
Ended up with more vias than probably looks good, but I figure it's less of an issue for grounds.
It is recommended to avoid vias for USB traces and capacitors, other than those, you could use as many as you want.

Either posting pictures of particular areas you want to be checked, or share the entire project, if you're comfortable with that.

The advice on vias is really good to know. I went through and rerouted a lot of traces, moved some caps around and was able to clean up some vias. I have a few resistors that net through vias and wasn't able to keep two of the caps ground sides from running through a via, but my hope is that it is minimal enough not to be an issue. I don't mind sharing the project if someone would be willing to take a look at my design to look for any bad practice/errors/opportunities. I would be happy to PM someone a file, I don't know if they would need KiCad, which I have been using, or if there is a way to export 'x' type of file I can figure that out
Title: Re: The Living PCB Design Thread
Post by: MandrewDavis on Tue, 08 August 2017, 13:37:26
Hello everyone,

About a year ago (https://geekhack.org/index.php?topic=45456.msg2221455#msg2221455) I found a really unique NOS blue Alps keyboard on eBay. After troubleshooting the error codes for a while and talking to Orihalcon, we figured out it couldn't be adapted to USB and so it was kept in a box up until about a week ago. With my spare Teensy 2++, I decided to teach myself some KiCAD and design a PCB for it. It will be using holtites, which is why the through-hole drill sizes for the switches are a bit larger than normal.

It would be greatly appreciated if someone could check my schematic, particularly what is going on with the locklights before I send to off to manufacturing. Also, do I really need a ground plane?

(https://i.imgur.com/MXrSNrx.jpg)
(https://i.imgur.com/b3FnnhC.jpg)

I have attached a zip if anyone needs a more detailed look at it.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Thu, 10 August 2017, 00:49:40
One thing you could do is to split the rows in "half" to get 10 rows. Then you'd only need half as many columns, using each column twice, once for each of the splits. That way you'd only need 21 instead of 26 pins for the matrix (you could probably do away with a few more mashing things together further) and get away with a regular Teensy rather than the plusplus.

It's common practice to connect LEDs the other way around, with the cathode towards the controlling pin. It doesn't matter much with a Teensy, but some chips are better at sinking than sourcing current and people just tend to do it that way. It may also be handy to connect all LEDs to pins that are connected to the same timer. For example yours are connected to pins with OC1A OC1B and OC2A if you move the one on PB4 to PB7 you'd only have OC1* pins. That way you can control the brightness with PWM using only one timer, which will be a bit cleaner to set up, and you'd not occupy the extra timer (which you aren't short on though).


Also, beef up on the traces, there's no reason to keep them skinny. Increase the spacing since you've got the room anyway. With tat in min, still tighten them up. Use more 45° traces and cut more corners. If you route some of the matrix lines from the controller underneath it, and move some more of them to the bottom layer you could slim down the board a bit (you may be physically constrained by the case to put the Teensy exactly there though). Green and red are allowed to overlap, that's the whole point =D

And no, you don't necessarily need a ground plane. Topres have them, but they do magic capacitive stuff. I have still to see a commercial cherry board that use one.

Are those half circle things cutouts for a ziptie or something? You probably want to make them regular round holes. Funky shaped holes usually cost extra.

If you put the matrix diodes on top as well the bottom of the board will be cleaner. They become a bit inaccessible for debugging if you use a plate though. Through hole diodes is a middle way. You can measure on them, but still not easily swap them out if broken.
Title: Re: The Living PCB Design Thread
Post by: feraphic on Tue, 15 August 2017, 20:58:36
Hey everyone,

I was wondering if I could get some advice and/or critiques on this (https://github.com/Feraphic/Attache) before I send it over to EasyEDA to be manufactured. I won't pretend that I have much of an idea of what I'm doing, and I'm sure the design isn't very elegant or efficient, but I don't mind as long as it works since I'm really only doing this for personal use.

Thanks
Title: Re: The Living PCB Design Thread
Post by: hanya on Wed, 16 August 2017, 07:24:45
I was wondering if I could get some advice and/or critiques on this (https://github.com/Feraphic/Attache) before I send it over to EasyEDA to be manufactured. I won't pretend that I have much of an idea of what I'm doing, and I'm sure the design isn't very elegant or efficient, but I don't mind as long as it works since I'm really only doing this for personal use.
Hi, it looks 14, 34, 44 and 24 pins of MCU are not connected to the power source in your schematic.
Title: Re: The Living PCB Design Thread
Post by: LazyDog on Wed, 16 August 2017, 08:01:33
Can someone tell me the exact dimensions of a cherry MX footprint? No diode or LED. What size through-hole do I need for the metal leads? How big (diameter) should the copper pad be? What diameter through-hole do I need for the plastic pin in the middle of the bottom of the switches (the one that goes through the PCB, for stability I imagine)?


I can't find these dimensions anywhere.

https://deskthority.net/w/images/d/de/Keymodule_MX.pdf
Title: Re: The Living PCB Design Thread
Post by: feraphic on Wed, 16 August 2017, 08:40:23
I was wondering if I could get some advice and/or critiques on this (https://github.com/Feraphic/Attache) before I send it over to EasyEDA to be manufactured. I won't pretend that I have much of an idea of what I'm doing, and I'm sure the design isn't very elegant or efficient, but I don't mind as long as it works since I'm really only doing this for personal use.
Hi, it looks 14, 34, 44 and 24 pins of MCU are not connected to the power source in your schematic.

Much appreciated! Hopefully this looks a little better.
(http://i.imgur.com/J3t7QJS.png)
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Wed, 16 August 2017, 09:26:24
Would love for someone to proof this for me. Seems like a lot of us FNGs have designs we're trying to make.

And in the second picture, where I have circled, does it matter that the two grounds connect to one another between the resistor and the cap?
Title: Re: The Living PCB Design Thread
Post by: ishtob on Fri, 25 August 2017, 22:55:57
the resistors between the usb and the MCU should prob be closer to the USB, though in a low speed application like a keyboard it prob won't matter nearly as much.

the resistor and cap ground you go there should be fine.
Title: Re: The Living PCB Design Thread
Post by: hasu on Fri, 25 August 2017, 23:36:26
the resistors between the usb and the MCU should prob be closer to the USB, though in a low speed application like a keyboard it prob won't matter nearly as much.

the resistor and cap ground you go there should be fine.

Yes, I've saw the resisters placed close to USB receptacle in some keyboard PCBs, not a few.
I'm curious about what theory or reason behind that practice is. Do you know document or something about this?

I found contrary practice in one of Atmel app notes and I've followed this and I place the resisters on D- and D+ line close to MCU in my PCB.
I cannot find the app note now I'll post it here later if I find.
Title: Re: The Living PCB Design Thread
Post by: ishtob on Sat, 26 August 2017, 00:06:24
 I guess I was under the mistaken impression that this resistor was meant to stop EMI from entering the device, therefor, placing it near the USB connectors made sense.

Looking through some papers online it isn't too much of an issue except for people using parallel terminations.
http://www.ultracad.com/mentor/mentor%20termination%20placement.pdf (http://www.ultracad.com/mentor/mentor%20termination%20placement.pdf)
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Sat, 26 August 2017, 00:25:57
Thanks guys! Gonna tune in the screw holes and send it out for prod
Title: Re: The Living PCB Design Thread
Post by: hasu on Sat, 26 August 2017, 01:19:54
I guess I was under the mistaken impression that this resistor was meant to stop EMI from entering the device, therefor, placing it near the USB connectors made sense.

Looking through some papers online it isn't too much of an issue except for people using parallel terminations.
http://www.ultracad.com/mentor/mentor%20termination%20placement.pdf (http://www.ultracad.com/mentor/mentor%20termination%20placement.pdf)

Thanks for clarifying.

So simple practice for us hobbyists is:

ESD/EMI protection deivces should be placed near USB receptacle while termination(impedance matcning) resistors should be placed near controller.

We already know empirically that it doesn't matter very much for keyboards, though, this simple design guide will be still helpful for us.


I couldn't find good reference for placement of termination resistors but these docs imply it.

EFM32 USB Hardware Design Guide p.5
https://www.silabs.com/documents/public/application-notes/AN0046.pdf

Atmel High Speed USB Design Guidelines p.3
http://www.atmel.com/images/doc7633.pdf
Title: Re: The Living PCB Design Thread
Post by: ishtob on Sat, 26 August 2017, 11:44:29
I guess I was under the mistaken impression that this resistor was meant to stop EMI from entering the device, therefor, placing it near the USB connectors made sense.

Looking through some papers online it isn't too much of an issue except for people using parallel terminations.
http://www.ultracad.com/mentor/mentor%20termination%20placement.pdf (http://www.ultracad.com/mentor/mentor%20termination%20placement.pdf)

Thanks for clarifying.

So simple practice for us hobbyists is:

ESD/EMI protection deivces should be placed near USB receptacle while termination(impedance matcning) resistors should be placed near controller.

We already know empirically that it doesn't matter very much for keyboards, though, this simple design guide will be still helpful for us.


I couldn't find good reference for placement of termination resistors but these docs imply it.

EFM32 USB Hardware Design Guide p.5
https://www.silabs.com/documents/public/application-notes/AN0046.pdf

Atmel High Speed USB Design Guidelines p.3
http://www.atmel.com/images/doc7633.pdf

The atmel documentation did specify to have the termination resistor as close to the signal pin as possible (section 2.3)

Thanks for your awesome insight!


Sent from my iPhone using Tapatalk Pro
Title: Re: The Living PCB Design Thread
Post by: feraphic on Sat, 26 August 2017, 15:44:01
Do I need to connect two pads with traces if they're already overlapping each other, or is that just redundant?

(http://i.imgur.com/zw6pGa7.png)
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sat, 26 August 2017, 17:36:06
Do I need to connect two pads with traces if they're already overlapping each other, or is that just redundant?
It's redundant because they are already connected, but it doesn't harm  to trace a wire.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sun, 27 August 2017, 01:01:53
In some cases it may even be bad to create loops like that. Here it won't matter. You may still want to connect them with a short short trace between the center of the pads to let the ERC know they are connected.

And beef up the traces, that just looks silly...
Title: Re: The Living PCB Design Thread
Post by: Tiramisuu on Thu, 31 August 2017, 23:50:08
Trying to layout my first PCB.

I am doing a very small layout; 26 keys
Going with a 16mm design so the switches will be very close together and using cut-down keycap and/or custom cap.
Planning on using a pro-micro

(http://i.imgur.com/z3RXJD7.png)

Installed Kicad and Eagle this evening then started thinking there is probably an easier way than doing everything from scratch... So here I am.

The layout is going to be the similar to a 16MM Edward or a shrunk down Gherkin only the bottom row will be offset 50% and 4 of the keys in the bottom row will be removed.

I can find gerber files for the gherkin and the 16mm Edward but no kicad/eagle project files.

I can create a layout with the keyboard-layout-editor with the layout I want but the wrong switch spacing then try to use kacelerator...   Which doesn't seem to be working properly with Eagle 7.6 or I have to hack something to actually get the scr to run to generate the initial schematic and board.

... I found the gh60 kicad project files ... I could use this as a starting point and then reduce it to my intended design.

I could start with a blank slate and work from tutorials and try to build the design from scratch using the other gerbers and kicad projest as reference.


My object is to end with a working PCB for my custom keyboard rather than learn everything there is to know about creating PCBs. (So quick and easy rather than an educational event)

What is the easy way to get to end of project on this?   


thanks,
T

Title: Re: The Living PCB Design Thread
Post by: _haru on Sun, 03 September 2017, 02:53:16
Trying to layout my first PCB.

I am doing a very small layout; 26 keys
Going with a 16mm design so the switches will be very close together and using cut-down keycap and/or custom cap.
Planning on using a pro-micro

Show Image
(http://i.imgur.com/z3RXJD7.png)


Installed Kicad and Eagle this evening then started thinking there is probably an easier way than doing everything from scratch... So here I am.

The layout is going to be the similar to a 16MM Edward or a shrunk down Gherkin only the bottom row will be offset 50% and 4 of the keys in the bottom row will be removed.

I can find gerber files for the gherkin and the 16mm Edward but no kicad/eagle project files.

I can create a layout with the keyboard-layout-editor with the layout I want but the wrong switch spacing then try to use kacelerator...   Which doesn't seem to be working properly with Eagle 7.6 or I have to hack something to actually get the scr to run to generate the initial schematic and board.

... I found the gh60 kicad project files ... I could use this as a starting point and then reduce it to my intended design.

I could start with a blank slate and work from tutorials and try to build the design from scratch using the other gerbers and kicad projest as reference.


My object is to end with a working PCB for my custom keyboard rather than learn everything there is to know about creating PCBs. (So quick and easy rather than an educational event)

What is the easy way to get to end of project on this?   


thanks,
T

I know I might get a bit of hate for this but if your end goal is to have a working PCB, it might be easier to just etch your own PCB.
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Thu, 07 September 2017, 05:40:55
Does it matter which way caps/resistors are attached? Do they have polarity?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 07 September 2017, 06:17:30
Does it matter which way caps/resistors are attached? Do they have polarity?
Resistors and ceramic capacitors (https://www.vishay.com/images/product-images/pt-large/45006-pt-large.jpg) don't, electrolytic capacitors (https://i.stack.imgur.com/sVEDF.jpg) are polarized.
Title: Re: The Living PCB Design Thread
Post by: jjanssen1 on Sat, 09 September 2017, 04:54:30
Two key ATTINY85 Osu/Macropad I designed :)

(https://i.imgur.com/yunCFtX.png)
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sat, 09 September 2017, 05:44:40
Two key ATTINY85 Osu/Macropad I designed :)

Show Image
(https://i.imgur.com/yunCFtX.png)

That looks cool. What are you using it for?
Title: Re: The Living PCB Design Thread
Post by: jjanssen1 on Sat, 09 September 2017, 07:03:55
Two key ATTINY85 Osu/Macropad I designed :)

Show Image
(https://i.imgur.com/yunCFtX.png)

That looks cool. What are you using it for?

I will be using it for playing Osu!
Title: Re: The Living PCB Design Thread
Post by: kamilakas on Wed, 13 September 2017, 11:24:14
Hi, guys! I'm bulding my own ergodox for school project as an innovative kbd layout. So, I found all sources of IC's version of ergodox. I have question - if I'll order PCBs and then will solder all the components, will there be an option to flash the keyboard via usb? Or I'll need some kind of programming device for microcontrollers?
Title: Re: The Living PCB Design Thread
Post by: yuktsi on Wed, 13 September 2017, 11:42:42
Hi, guys! I'm bulding my own ergodox for school project as an innovative kbd layout. So, I found all sources of IC's version of ergodox. I have question - if I'll order PCBs and then will solder all the components, will there be an option to flash the keyboard via usb? Or I'll need some kind of programming device for microcontrollers?
You will need a programmer, at least for the first time. I think.
Title: Re: The Living PCB Design Thread
Post by: kamilakas on Wed, 13 September 2017, 11:52:49
Hi, guys! I'm bulding my own ergodox for school project as an innovative kbd layout. So, I found all sources of IC's version of ergodox. I have question - if I'll order PCBs and then will solder all the components, will there be an option to flash the keyboard via usb? Or I'll need some kind of programming device for microcontrollers?
You will need a programmer, at least for the first time. I think.
So, PCB have some direct controller outputs. Will I have possibility with this pins?
Title: Re: The Living PCB Design Thread
Post by: yuktsi on Wed, 13 September 2017, 12:09:13
Hi, guys! I'm bulding my own ergodox for school project as an innovative kbd layout. So, I found all sources of IC's version of ergodox. I have question - if I'll order PCBs and then will solder all the components, will there be an option to flash the keyboard via usb? Or I'll need some kind of programming device for microcontrollers?
You will need a programmer, at least for the first time. I think.
So, PCB have some direct controller outputs. Will I have possibility with this pins?
I've no experience with ergodox, but I think you will need to have connection to the MISO, MOSI, SCK, RESET, VCC and GND
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 13 September 2017, 12:48:09
Which microcontroller is it? ATmega32u4? In that case it will come with a bootloader to enable flashing over USB.

Be careful not to get the ATmega32u4RC though. It doesn't come with the loader and will need serial programming.


Found out that it's something completely different.
Title: Re: The Living PCB Design Thread
Post by: hasu on Wed, 13 September 2017, 13:03:29
Hi, guys! I'm bulding my own ergodox for school project as an innovative kbd layout. So, I found all sources of IC's version of ergodox. I have question - if I'll order PCBs and then will solder all the components, will there be an option to flash the keyboard via usb? Or I'll need some kind of programming device for microcontrollers?
You will need a programmer, at least for the first time. I think.
So, PCB have some direct controller outputs. Will I have possibility with this pins?
I've no experience with ergodox, but I think you will need to have connection to the MISO, MOSI, SCK, RESET, VCC and GND

Seems like Kinetis K20 series don't have USB bootloader at factory shipment and you have to program it with JTAG, SWD or something. I think I:C use Segger J-Link with Tag-Connect cable via P1 pinouts in their fab but you can find cheaper alternative apparatus. You may want/have to check datasheet and appnotes for checking if pinouts(P3) has pins enough for program and program methods.
https://www.nxp.com/docs/en/application-note/AN4835.pdf
Kinetis K20_72 (https://www.nxp.com/products/microcontrollers-and-processors/arm-based-processors-and-mcus/kinetis-cortex-m-mcus/k-series-performance-m4/k2x-usb/kinetis-k20-72-mhz-full-speed-usb-mixed-signal-integration-microcontrollers-mcus-based-on-arm-cortex-m4-core:K20_72?tab=Documentation_Tab)
Title: Re: The Living PCB Design Thread
Post by: Irlwizard on Wed, 27 September 2017, 21:30:28
Found a PCB building guide. Nothing I can personally attempt but some of you might find it useful.

Link: https://github.com/ruiqimao/keyboard-pcb-guide
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 28 September 2017, 08:51:40
I've seen this on quite a few PCBs but I need some help understanding how it works.

[attach=1]

Those are supposed to be stepped and regular caps lock so they share the same diode.

If the two switch pads are overlapped, how is this not shorting?

Title: Re: The Living PCB Design Thread
Post by: Tiramisuu on Thu, 28 September 2017, 11:53:58
A bit off topic but...

What do you use for staring at PCB's when working on them.

My little plastic 5x monocle lets me squint at a PCB but it won't be terribly comfortable
while placing smd parts with tweezer and cooking them on with a hot air gun.   I should probably buy a little toaster oven as well.

thanks,
t.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Thu, 28 September 2017, 23:16:25
I've seen this on quite a few PCBs but I need some help understanding how it works.

Those are supposed to be stepped and regular caps lock so they share the same diode.

If the two switch pads are overlapped, how is this not shorting?

The diode is probably connected to both the outer pads and the middle pad to the "other side" of the matrix. If the switch pins are A and B, current flows from A-B in one position and B-A in the other, the switch really doesn't care.


What do you use for staring at PCB's when working on them.

I find that the strongest reading glasses (+4) you find at the cheap places is enough for a lot of work. For inspecting stuff where I have a free hand anyway I use a 10X hand held loupe, I don't find that too inconvenient.

You can find "glasses" like these very cheap on ebay as well
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Fri, 29 September 2017, 02:46:29
I've seen this on quite a few PCBs but I need some help understanding how it works.

Those are supposed to be stepped and regular caps lock so they share the same diode.

If the two switch pads are overlapped, how is this not shorting?

The diode is probably connected to both the outer pads and the middle pad to the "other side" of the matrix. If the switch pins are A and B, current flows from A-B in one position and B-A in the other, the switch really doesn't care.
That was so obvious that I feel dumb. Thank you so much for your clarification.
Title: Re: The Living PCB Design Thread
Post by: Tiramisuu on Fri, 29 September 2017, 16:29:09
... and thanks for the help...

(https://i.imgur.com/Zsk1peE.jpg?1)

V1 is slowly becoming something.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Fri, 29 September 2017, 16:35:11
... and thanks for the help...

Show Image
(https://i.imgur.com/Zsk1peE.jpg?1)


V1 is slowly becoming something.
So... ALPS or MX?
Title: Re: The Living PCB Design Thread
Post by: Tiramisuu on Fri, 29 September 2017, 17:00:11
... and thanks for the help...

Show Image
(https://i.imgur.com/Zsk1peE.jpg?1)


V1 is slowly becoming something.
So... ALPS or MX?

MX - Kailh Speed Silvers with custom 15cN springs @ 2MM.   
The speed silvers have a 1.1mm activation point so I am hoping for about 12cN activation.

I may look at the Cherry Speeds as well 1.2mm activation point but I'd like to see if the manufacturing tolerances are better.

...  I'm also going to try the Kailh Low Profile switches on one of the prototypes if they are willing to send me some keycaps.

... I have a gherkin with the gat whites and a planck with the Matias reds here and when my spring order comes in from China I will be trying them on all the different switches here to see how they feel. 

I will be assembling 5 prototypes to send around for steno folks to try so I will likely do 5 different switch configurations for them to try.   The Matias have the advantage of being dead easy to swap springs on but the higher activation point of the speeds and the low profiles with their decreased travel and higher activation points are also appealing.

It is a shame that the newest kailh (2017) low profile switches are't being manufactured in a linear version.

Keycaps wise... I will start with dremelled down G20's but I would love to find a nice solution both for 16mm steno keycap and full size steno keycaps.    Home row position is between the rows in steno and you press many keys at a time (chording) ... So this means a Flat Key to with close edges and enough thickness that it doesn't catch your finger tips is desirable.
 


Title: Re: The Living PCB Design Thread
Post by: dr_derivative on Thu, 02 November 2017, 13:05:11
Does anyone know where I can find a footprint for SMK 2nd gen switches (https://deskthority.net/wiki/SMK_second_generation)?

I have a bunch of those switches incoming but I want to be able to start the PCB design before they arrive.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 02 November 2017, 15:04:05
Does anyone know where I can find a footprint for SMK 2nd gen switches (https://deskthority.net/wiki/SMK_second_generation)?

I have a bunch of those switches incoming but I want to be able to start the PCB design before they arrive.
These gentlemen (https://deskthority.net/group-buys-f50/bleach60-aruz-and-smk-compatible-60-t16384.html) made a 60% PCB for those switches, they are likely to have what you're looking for.
Title: Re: The Living PCB Design Thread
Post by: _haru on Thu, 02 November 2017, 22:37:14
Does anyone know where I can find a footprint for SMK 2nd gen switches (https://deskthority.net/wiki/SMK_second_generation)?

I have a bunch of those switches incoming but I want to be able to start the PCB design before they arrive.
These gentlemen (https://deskthority.net/group-buys-f50/bleach60-aruz-and-smk-compatible-60-t16384.html) made a 60% PCB for those switches, they are likely to have what you're looking for.

There's also an XD64/HHKB JP layout version coming with support for SMK and MX switches.
Title: Re: The Living PCB Design Thread
Post by: dr_derivative on Fri, 03 November 2017, 06:19:12
Does anyone know where I can find a footprint for SMK 2nd gen switches (https://deskthority.net/wiki/SMK_second_generation)?

I have a bunch of those switches incoming but I want to be able to start the PCB design before they arrive.
These gentlemen (https://deskthority.net/group-buys-f50/bleach60-aruz-and-smk-compatible-60-t16384.html) made a 60% PCB for those switches, they are likely to have what you're looking for.

Thanks, I'll send them a PM
Title: Re: The Living PCB Design Thread
Post by: farhai on Sun, 05 November 2017, 17:41:48
sorry sir i want to ask about the atmega32u4

i look the datasheet and there is two variant atmega32u4 and atmega32u4RC
what should i choice?

thanks
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 06 November 2017, 03:16:00
sorry sir i want to ask about the atmega32u4

i look the datasheet and there is two variant atmega32u4 and atmega32u4RC
what should i choice?

thanks

The RC version is pre-programmed to use the internal 8MHz oscillator. You most probably don't want that one. You would need a programmer to change the fuse settings to be able to use it (easily) with USB. I also believe the none-RC version is more readily available anyway.

Edit: I forgot that the RC version comes without a bootloader, since it's not intended to be used for USB anyway.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 29 November 2017, 05:50:35
Greetings gentlemen, I'm back with some more questions.

I wanna make a snap-off section on a PCB to eventually remove some of the keys and I'm considering using mouse bites rather than a V-groove as I need traces to go across, hence I have some questions in this regard.
1. Is it a bad idea and should I drop it altogether?
2. If not, how large should each hole be and at what distance from each other?
3. Should be traces shrinked across the breaking line for a cleaner cut? I usually use 20 mil for VCC and 12 mil traces for anything else and I though to halve them.

On a different topic; I'd like to understand how SK6812 works. Specifically I'd like to ask:
1. It is my understanding that they can be daisy chained by connecting one's output the next one's input. The DO of the last LED in the series should be left unconnected. Is it right?
2. They are individually addressable so, in theory, they could be used with one pin as LED indicators as one or the other could be left unlit. Correct?
3. Obviously a PWM pin should be used for them, does it matter which one on a m32u4? Any reason for choosing, say, B7 over, say, B6?
4. I've noticed that commercial LED strips have a capacitor next to each LED. This datasheet (https://cdn-shop.adafruit.com/.../SK6812+LED+datasheet+.pdfl) also uses capacitors on each LED but the value is missing. What should it be?
5. How to deal with the relatively low current provided by the USB port? Say I want to underglow the board with 12 LEDs, do I need a transistor for each LED or just one for the entire series? Which transistor would I choose?

Thank you.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 29 November 2017, 06:27:45
I've never done mouse bites.

I haven't really used SK6812s either, but as far as I can tell
1. Yes, you should be able to leave it unconnected.
2. Yes, you'll only need one controller pin to control all LEDs.
3. No, how would that work? You tell them over the serial protocol what intensity to be.
4. Not too much or you'll break the 10µF limit in the USB specification (remember to add in anything the rest of the board/controller has as well).
5. Do you need to be able to disconnect them completely? Otherwise just tell them to not glow. If you need to supply more current it seems like you can use a separate supply for the LEDs. Make sure the LEDs and the controller share GND though as that is indicated in the datasheet I found from Adafruit. It's a bit unclear what will happen if you put 5V data into the Din pin when there is no supply power applied. The datasheet isn't very well written/translated.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 29 November 2017, 07:12:53
3. No, how would that work? You tell them over the serial protocol what intensity to be.
Yes, I get that, but would you choose a PWM pin over another PWM or any pin will do as long as it's PWM? (sorry for being redundant).

4. Not too much or you'll break the 10µF limit in the USB specification (remember to add in anything the rest of the board/controller has as well).
Noted. I guess 0.1uF, as found in some diagrams, could work, then.

5. Do you need to be able to disconnect them completely? Otherwise just tell them to not glow.
I'm thinking  to solder them on the board so they won't be disconnected but simply off.

If you need to supply more current it seems like you can use a separate supply for the LEDs. Make sure the LEDs and the controller share GND though as that is indicated in the datasheet I found from Adafruit. It's a bit unclear what will happen if you put 5V data into the Din pin when there is no supply power applied. The datasheet isn't very well written/translated.
I'm not really fond of separate power supply, so I could drop the underglow idea, but I guess a mere three SK6812 as status indicators shouldn't cause any issue.

Thank you.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 29 November 2017, 07:25:30
How many LEDs are you planning to use? Only the indicators? In that case you shouldn't run into any problems at all. 100×0.1µF is 10µF for a ~full keyboard back lit.

Use any IO-pin for IO, PWM if you need PWM =)
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 29 November 2017, 07:32:05
How many LEDs are you planning to use? Only the indicators? In that case you shouldn't run into any problems at all. 100×0.1µF is 10µF for a ~full keyboard back lit.
Either only two or three indicators or, at best, a dozen on the backside for the underglow.
But since I have enough pins for three discrete status LEDs, I might go for that. I design PCBs better than I write firmwares, which should give you the idea how awful I write codes.

Use any IO-pin for IO, PWM if you need PWM =)
Oh, now I get what you mean. Thanks.
Title: Re: The Living PCB Design Thread
Post by: monkeyplusplus on Mon, 15 January 2018, 16:30:08
I recently finished the smd soldering on a board that used a 2-pad crystal, rather than a 4-pad crystal. Personally, the 4-pad crystal is the hardest part of a typical keyboard PCB for me to do by hand, but the 2-pad was a breeze. The board seems to function great, so I'm considering integrating the same device into my plans and ditching the tricky 4-pad component. Does anyone here have experience with these, and knows how they connect vs the usual 4-pad? Here's the component I used: https://www.digikey.com/product-detail/en/1128909

Sent from my Pixel 2 XL using Tapatalk

Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Tue, 16 January 2018, 03:23:58
I use four pads crystals because the seem to be much easier to find. Soldering them could be hard with a soldering iron but it's immensely easy with a hot air gun.

Anyway, your link is dead.
Title: Re: The Living PCB Design Thread
Post by: monkeyplusplus on Tue, 16 January 2018, 09:18:56
Are you sure the link is dead? I just poked it on my phone and it worked. Digikey part number is 644-1037-1-ND.

Octopart link: https://octopart.com/nx5032ga-16.000000mhz-ln-cd-1-ndk-21025276?r=sp&s=ymptYUDzRdimBWE8oHDbPg

I have had some success modifying the footprint of the 4 pad crystal by adding some area to the PCB pads so an iron with a fine tip can get in there,  but then you're using a nonstandard layout. Using hot air for soldering is a new experience for me, but I'd like to try it.

My question is how the 2 pad crystal looks in schematic, if anyone here has that knowledge.
Title: Re: The Living PCB Design Thread
Post by: monkeyplusplus on Tue, 16 January 2018, 09:56:48
(Side note to people using mobile devices to post via tapatalk - test links on desktop before posting, since some links seem to only work on mobile. Gross.)
Title: Re: The Living PCB Design Thread
Post by: monkeyplusplus on Tue, 16 January 2018, 10:25:16
Speaking with another forum, they have told me that the method for hooking these 2 pad crystals is basically the same as hooking up a 4 pad crystal with the exception of the additional ground that the 4 pads have. So instead of the center path to ground shown on the schematic shown here, you just have the load caps grounded. I hope that helps anyone else who might want to use one of these components vs the usual 4 pad crystals. :)
Title: Re: The Living PCB Design Thread
Post by: meanagray on Wed, 17 January 2018, 06:25:27
Hey guys. I am making a protot pcb for my 40% build. Its my first pcb, hence I am starting with a small size and something basic. Promicro + kailh switches.
 One question, I have is, how are DIP switches integrated with the PCB. The firmware logic, especially. My doubt is, if they are put on the switch matrix lines, then, on every polling the closed switches will give out a signal, which essentially mimics a 'HELD down' on a normal key switch.  Then on serial, without any keypress, the bus will still be pinging with the signal from closed DIP switch. 
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 17 January 2018, 07:33:53
how are DIP switches integrated with the PCB.
Unless you have desire to use physical DIP switches, you might wanna use QMK's virtual DIP switches functionality.
Title: Re: The Living PCB Design Thread
Post by: meanagray on Fri, 19 January 2018, 10:04:05
how are DIP switches integrated with the PCB.
Unless you have desire to use physical DIP switches, you might wanna use QMK's virtual DIP switches functionality.


Wow, didn't know that existed ...
Title: Re: The Living PCB Design Thread
Post by: sparrows89 on Tue, 27 March 2018, 17:28:07
This is my first time trying to design a keyboard PCB, but I have some experience doing small circuits before. I just want to do a bit of a sanity check and see if I've done any easy traps for beginners. I've tried to make all the capacitors close as can be for any VCC pins, as well as keeping every thing short and neat as possible too. I've also done all the placements according to the plate builder's DXF drawing, then aligning centres on both Eagle CAD and Fusion360.

(https://i.imgur.com/K7f3lVK.png)

The schematics shouldn't come as too much of a surprise, I looked at the standard schematic and then filled in anything I was missing, like the occilator with a FA-238 package. Most items come from the Adafruit and Sparkfun Eagle CAD library too. I may want to add some WS2812 LEDs as well. I'd assume it's just a case of making power rails with a .1uf to 1uf capacitor at each IC, then a data rail with an appropriate resistor going from the micocontroller?

(https://i.imgur.com/YMG70yL.png)

Finally, it seems like the age old question repeated a few times here, but when purchasing the ATMEGA32U4, it doesn't come with any bootloader, correct? I'll need to use AVR dude or some utility to put it on before I can use the QMK Toolbox?
Title: Re: The Living PCB Design Thread
Post by: a-c on Tue, 27 March 2018, 17:59:17
Page 1 of datasheet indicates parts using ext clock come with bootloader installed.

Page 422 do no get the part setup for internal RC.

http://ww1.microchip.com/downloads/en/DeviceDoc/Atmel-7766-8-bit-AVR-ATmega16U4-32U4_Datasheet.pdf

edit: found latest datasheet.
Title: Re: The Living PCB Design Thread
Post by: hanya on Wed, 28 March 2018, 01:43:07
This is my first time trying to design a keyboard PCB, but I have some experience doing small circuits before. I just want to do a bit of a sanity check and see if I've done any easy traps for beginners. I've tried to make all the capacitors close as can be for any VCC pins, as well as keeping every thing short and neat as possible too. I've also done all the placements according to the plate builder's DXF drawing, then aligning centres on both Eagle CAD and Fusion360.

Show Image
(https://i.imgur.com/YMG70yL.png)

You should avoid tracks under the crystal, even the another layer of the board. It might make your system unstable by the unstable clock or some noise.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 28 March 2018, 03:24:33
This is my first time trying to design a keyboard PCB, but I have some experience doing small circuits before. I just want to do a bit of a sanity check and see if I've done any easy traps for beginners. I've tried to make all the capacitors close as can be for any VCC pins, as well as keeping every thing short and neat as possible too. I've also done all the placements according to the plate builder's DXF drawing, then aligning centres on both Eagle CAD and Fusion360.

Show Image
(https://i.imgur.com/YMG70yL.png)

You should avoid tracks under the crystal, even the another layer of the board. It might make your system unstable by the unstable clock or some noise.
And you should avoid vias on the USB traces. It doesn't mean it's not gonna work but it's recommended to avoid that nonetheless.

If I were you, sparrows89, I would rotate the m32u4 90° clockwise and put the crystal (with its capacitors) to the right of the MCU, right below the USB port. That would also give you the opportunity to shorten the D-/D+ traces a bit.
Title: Re: The Living PCB Design Thread
Post by: senso on Wed, 28 March 2018, 05:56:51
I would add that the traces for the columns are very thigh, are you sure its manufacturable by your pcb shop, because it looks to be under 6 mils, and you could/should make the traces larger, at least 10 mils.
Title: Re: The Living PCB Design Thread
Post by: sparrows89 on Wed, 28 March 2018, 16:12:02
Thanks for the advice everybody, especially with avoiding traces over a crystal and avoiding vias on the USB lines. I had to go back to the drawing board just a bit, but there's no shame in doing so if it means a better working board. My plan is to make an ortholinear with Kailh PG1232 in the future, this is just the first step to gaining that confidence! Next up is ordering boards, a solder paste stencil and borrowing a hot air rework station!
Title: Re: The Living PCB Design Thread
Post by: shensmobile on Fri, 30 March 2018, 12:50:42
Hey guys, does anyone know where I can find a 7u spacebar footprint for KiCAD?
Title: Led Lightning Power
Post by: marhalloweenvt on Fri, 30 March 2018, 14:12:21
Sorry for this dumb question but i can't figure it out by myself. I am desing a new TKL PCB. I want to have backlight led (white color) for every switch. How do i manage for every led? Each led draws 20 mA and around 3V. Which component do i need to use? Transitor, mosfet, ......
Title: Re: The Living PCB Design Thread
Post by: funderburker on Fri, 30 March 2018, 14:34:46
Hey guys, does anyone know where I can find a 7u spacebar footprint for KiCAD?



ai03 (https://github.com/ai03-2725/MX_Alps_Hybrid.pretty) has hybrid footprints but you can try out all of these - here (https://kbwiki.ai03.me/books/pcb-design/page/list-of-kicad-keyboard-parts-libraries)
Title: Re: The Living PCB Design Thread
Post by: shensmobile on Fri, 30 March 2018, 17:58:28
Hey guys, does anyone know where I can find a 7u spacebar footprint for KiCAD?



ai03 (https://github.com/ai03-2725/MX_Alps_Hybrid.pretty) has hybrid footprints but you can try out all of these - here (https://kbwiki.ai03.me/books/pcb-design/page/list-of-kicad-keyboard-parts-libraries)

Thanks!  That has everything I need. 

Edit:  Actually, I got one more question for you guys.  I'm trying to build an ortho board that fits in a 60% case.  Is there an easy way to figure out where the USB port and mounting holes have to go?
Title: Re: The Living PCB Design Thread
Post by: boomgopher on Wed, 04 April 2018, 22:19:49
Edit:  Actually, I got one more question for you guys.  I'm trying to build an ortho board that fits in a 60% case.  Is there an easy way to figure out where the USB port and mounting holes have to go?

There's probably other sources, but I used this PCB as a reference for USB and holes, measurements are in editor:
https://easyeda.com/ai03/Lunar_Keyboard_MK3-6c51a037bbac4cab8287488cca35ebb9
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Mon, 23 April 2018, 19:28:54
I'm following the the popular github guide, but extrapolating to an 86key layout. While creating the schematic, I can connect Rows/Columns to any Port pin on the Atmega? (PB, PB, PD, PE and PF?)
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Tue, 24 April 2018, 03:53:42
I can connect Rows/Columns to any Port pin on the Atmega? (PB, PB, PD, PE and PF?)
Sure, as long as you configure your firmware accordingly.
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Tue, 24 April 2018, 05:12:43
I can connect Rows/Columns to any Port pin on the Atmega? (PB, PB, PD, PE and PF?)
Sure, as long as you configure your firmware accordingly.

Awesome, thank you!

Not even remotely close to that point yet. That's a problem for future me.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Tue, 24 April 2018, 05:26:24
Although, some pins are reserved for special purposes (off the top of my head the PE2/HWB on the m32u4). The datasheet for your MCU will explain thoroughly. When in doubt, just ask.
Title: Re: The Living PCB Design Thread
Post by: regack on Wed, 25 April 2018, 17:33:01
Can anyone explain in better wording what this means (from the ATMEGA32U4 datasheet):

    • HWB – Port E, Bit 2
       HWB allows to execute the bootloader section after reset when tied to ground during external
       reset pulse. The HWB mode of this pin is active only when the HWBE fuse is enable. During normal
       operation (excluded Reset), this pin acts as a general purpose I/O.

I just... don't understand what it's telling me.  Basically, can I actually use this pin, and not tie it to ground, but still get to the bootloader with the physical reset switch for reprogramming, like I've been doing for the last ~5 years? :)
Title: Re: The Living PCB Design Thread
Post by: vvp on Thu, 26 April 2018, 02:18:22
You cannot use HWB pin without a pull down resistor(*) to ground if you want to run the bootloader after pressing the reset button. During the time the reset button is pressed the voltage on HWB pin must be below 0.2*Vcc - 0.1. In case of Vcc=5V, it must be below 0.9 V. Otherwise your 5 year old bootloader on reset feature will disappear.

(*) The pull down resistor may be already there on the breakout PCB. Check it's schematic.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 26 April 2018, 06:42:10
Can anyone explain in better wording what this means (from the ATMEGA32U4 datasheet):

    • HWB – Port E, Bit 2
       HWB allows to execute the bootloader section after reset when tied to ground during external
       reset pulse. The HWB mode of this pin is active only when the HWBE fuse is enable. During normal
       operation (excluded Reset), this pin acts as a general purpose I/O.

I just... don't understand what it's telling me.  Basically, can I actually use this pin, and not tie it to ground, but still get to the bootloader with the physical reset switch for reprogramming, like I've been doing for the last ~5 years? :)
It is my understanding that PE2/HWB is only used during a reset routine but it requires a pull down resistor (and I've seen both 1 and 10 KOhm here), meaning that you can actually use it as GPIO, if you can live with the resistor. What I get from this is that you'd better use it as a output pin, with something that already requires a 1 or 10 KOhm resistor, say a LED, rather than as input for it might eventually trigger the reset routine. Someone please correct me if I'm wrong.
Title: Re: The Living PCB Design Thread
Post by: vvp on Thu, 26 April 2018, 08:56:17
Well, I would be careful with putting LED on HWB in series with the original pull down resistor. Forward voltage of LEDs is typically more than 0.9V. It is not a big deal though since LEDs conduct some current even below the forward voltage. But if you are unlucky and some interference kicks in then you may not enter the bootloader when you wanted to. If that happens then you would just press the reset button again and again untill the bootloader is entered. You should eventually get there.

After the MCU boots, there is no problem using HWB pin for GPIO (whether input or output ... it does not really matter). The rest of the circuit just cannot mind the pull down resistor there. Most of the time it does not matter. It only increases the power consumption a tiny bit. I used HWB as GPIO myself. It works without any problems (if the rest of the circuit does not mind the pull down there).

E.g. if your keyboard matrix scanning works with pull downs and shortening through switches to the Vcc (instead of to GND as it is common) then you can perfectly use HWB pin as one of the keyboard matrix scanning pins. You would need the pull down there anyway. This is one of the cases when HWB use does not even increase the power consumption.
In other cases, when the ideal circuit does not use pull up nor pull down then you often can add a pull down. In such a case it only increases the power consumption a bit. If the rest of the circuit requires a pull up there then you course you cannot use HWB pin (and keep the boot loader on reset feature).
Title: Re: The Living PCB Design Thread
Post by: regack on Thu, 26 April 2018, 10:06:52
Ahhh, okay, I understand now, thanks.  I can work with this... I'll just get creative with making sure I can either 1) use it as GPIO with the pull down, or 2) just add some kind of switching for when I need/want to be able to reset to bootloader.  It's not like I'm constantly reprogramming things.   

Thanks for the insight. 
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 26 April 2018, 11:02:11
Well, I would be careful with putting LED on HWB in series with the original pull down resistor. Forward voltage of LEDs is typically more than 0.9V. It is not a big deal though since LEDs conduct some current even below the forward voltage. But if you are unlucky and some interference kicks in then you may not enter the bootloader when you wanted to. If that happens then you would just press the reset button again and again untill the bootloader is entered. You should eventually get there.

After the MCU boots, there is no problem using HWB pin for GPIO (whether input or output ... it does not really matter). The rest of the circuit just cannot mind the pull down resistor there. Most of the time it does not matter. It only increases the power consumption a tiny bit. I used HWB as GPIO myself. It works without any problems (if the rest of the circuit does not mind the pull down there).

E.g. if your keyboard matrix scanning works with pull downs and shortening through switches to the Vcc (instead of to GND as it is common) then you can perfectly use HWB pin as one of the keyboard matrix scanning pins. You would need the pull down there anyway. This is one of the cases when HWB use does not even increase the power consumption.
In other cases, when the ideal circuit does not use pull up nor pull down then you often can add a pull down. In such a case it only increases the power consumption a bit. If the rest of the circuit requires a pull up there then you course you cannot use HWB pin (and keep the boot loader on reset feature).
Great explaination, as always. Thanks vvp.
Title: Re: The Living PCB Design Thread
Post by: e11i0t23 on Sun, 29 April 2018, 12:26:55
Hi

Which micro-controller do you recommend to use more the atmega32u4 or the AT90USB1286 for my keyboard pcb and why? finaly is there any different things needed to set up the AT90USB1286 in the schematic/PCB

thanks
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sun, 29 April 2018, 12:32:57
Which micro-controller do you recommend to use more the atmega32u4 or the AT90USB1286 for my keyboard pcb and why?
Depends on your needs. Both controllers are widely supported by the most popular firmwares around so you don't have to write any code yourself (aside for config, matrix and keymaps).

is there any different things needed to set up the AT90USB1286 in the schematic/PCB
Different things from the m32u4 you mean?
Title: Re: The Living PCB Design Thread
Post by: e11i0t23 on Sun, 29 April 2018, 14:38:04
Which micro-controller do you recommend to use more the atmega32u4 or the AT90USB1286 for my keyboard pcb and why?
Depends on your needs. Both controllers are widely supported by the most popular firmwares around so you don't have to write any code yourself (aside for config, matrix and keymaps).

is there any different things needed to set up the AT90USB1286 in the schematic/PCB
Different things from the m32u4 you mean?
Yes from the 32u4


Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sun, 29 April 2018, 14:42:27
Which micro-controller do you recommend to use more the atmega32u4 or the AT90USB1286 for my keyboard pcb and why?
Depends on your needs. Both controllers are widely supported by the most popular firmwares around so you don't have to write any code yourself (aside for config, matrix and keymaps).

is there any different things needed to set up the AT90USB1286 in the schematic/PCB
Different things from the m32u4 you mean?
Yes from the 32u4
When in doubt, datasheets are your friends. In my experience, they pretty much need the same discrete components to run, you can check the schematics of the Teensy 2.0 (https://www.pjrc.com/teensy/schematic2.gif) and the Teensy++ 2.0 (https://www.pjrc.com/teensy/schematic2pp.gif).
Title: Re: The Living PCB Design Thread
Post by: e11i0t23 on Sun, 29 April 2018, 14:44:11
Thank you for your help I think as I don't need the extra pins of the at90 illngo with the atmega32u4 as it's half the price


Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sun, 29 April 2018, 14:54:19
Thank you for your help I think as I don't need the extra pins of the at90 illngo with the atmega32u4 as it's half the price
You're welcome, and I honestly believe a m32u4 is enough for most things.
Do consider that you can design a 11 * 11 matrix out of it for a total of 121 inputs, or even a 12 * 12, if you don't need LEDs.
That's pretty much my approach here (https://geekhack.org/index.php?topic=92962.0).
Title: Re: The Living PCB Design Thread
Post by: e11i0t23 on Sun, 29 April 2018, 14:56:15
Thank you for your help I think as I don't need the extra pins of the at90 illngo with the atmega32u4 as it's half the price
You're welcome, and I honestly believe a m32u4 is enough for most things.
Do consider that you can design a 11 * 11 matrix out of it for a total of 121 inputs, or even a 12 * 12, if you don't need LEDs.
That's pretty much my approach here (https://geekhack.org/index.php?topic=92962.0).
Deffiently plenty for a 40% as well as the tkl I am working on


Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Sun, 06 May 2018, 16:46:56
I can just grab the default M2 screw holes from the Kicad's basic mounting hole library and that should be fine yeah?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Mon, 07 May 2018, 14:23:57
I can just grab the default M2 screw holes from the Kicad's basic mounting hole library and that should be fine yeah?
In the ISO metric screw thread standard, the number in the screw size matches the maximum diameter allowed. So basically, for a M2 screw, you just need a 2mm hole.
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Mon, 07 May 2018, 21:16:45
Alright PCB and components ordered! Wish me luck guys!!
Title: Re: The Living PCB Design Thread
Post by: regack on Tue, 08 May 2018, 18:18:47
Alright PCB and components ordered! Wish me luck guys!!

With a 40% you'd be fine with an m32u2 even.  Good luck, and have fun! 
Title: Re: The Living PCB Design Thread
Post by: iaso on Wed, 09 May 2018, 06:59:04
Trying to find out if I can run a  6x15 matrix of an atmega32u4 qfp44. I have this crazy keyboard idea in mind, but no space running a controller board. Figured I'd integrate everything.

If the above is too big of a matrix for the atmega32u4, what would be the maximum matrix size I can run with this chip?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Wed, 09 May 2018, 08:50:39
Trying to find out if I can run a  6x15 matrix of an atmega32u4 qfp44. I have this crazy keyboard idea in mind, but no space running a controller board. Figured I'd integrate everything.

If the above is too big of a matrix for the atmega32u4, what would be the maximum matrix size I can run with this chip?
I made a 11*11 matrix with three dedicated LED indicators out of a m32u4. It's opensource for you to have a look (link (https://geekhack.org/index.php?topic=92962.0)).
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Thu, 10 May 2018, 19:31:59
How can I determine where the mounting holes in KiCAD will be in order to place screw posts in FreeCAD?
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Tue, 15 May 2018, 02:30:11
Just arrived! Looks beautiful! No idea if it's going to work, I don't even know when I'm going to have a minute to solder all the components, but it looks beautiful at least!
Title: Re: The Living PCB Design Thread
Post by: elfick on Tue, 15 May 2018, 10:38:56
Just arrived! Looks beautiful! No idea if it's going to work, I don't even know when I'm going to have a minute to solder all the components, but it looks beautiful at least!
Where did you order your PCB? Also, which github guide were you following?

TIA!
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Tue, 15 May 2018, 14:47:01
Just arrived! Looks beautiful! No idea if it's going to work, I don't even know when I'm going to have a minute to solder all the components, but it looks beautiful at least!
Where did you order your PCB? Also, which github guide were you following?

TIA!

You can find a ton of places online that will make a pcb if you send them the files. there are quite a few tutorials online as well. I would just google search and you should be able to find one that works best for you!
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Thu, 17 May 2018, 17:54:42
Was looking over my PCB to verify my traces and noticed two VCC pads I forgot to via to my connected VCC trace, one that connects out to a cap but not connected to anything else. Is this going to be an issue? I could always just jumper them in if I need to, but hoping it is not going to cause any issues...?
Title: Re: The Living PCB Design Thread
Post by: hasu on Fri, 18 May 2018, 04:26:41
It may work but you better connect all vcc/avcc pins to power source. I had a problem without giving avcc(44) power when programming flash(I can't remember it was ISP or USB bootloader), IIRC.
Asumming the mcu is ATMega32u4 note that pin 44 is actually AVCC, not VCC and I think it is not connected internally, also pin 2 is UVCC. Not ciritical for you design in fact, though, you may want to check datasheet for next interation.

When any ratsnest lines are drawn in the CAD as your pic shows it means that you don't finish routing tracks yet. And DRC must be always your good friend, you would receive waring for the unconnected pads from it in this case.
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Fri, 18 May 2018, 13:57:52
It may work but you better connect all vcc/avcc pins to power source. I had a problem without giving avcc(44) power when programming flash(I can't remember it was ISP or USB bootloader), IIRC.
Asumming the mcu is ATMega32u4 note that pin 44 is actually AVCC, not VCC and I think it is not connected internally, also pin 2 is UVCC. Not ciritical for you design in fact, though, you may want to check datasheet for next interation.

When any ratsnest lines are drawn in the CAD as your pic shows it means that you don't finish routing tracks yet. And DRC must be always your good friend, you would receive waring for the unconnected pads from it in this case.

I will get it jumpered. I had them via'd not sure when I went it and broke the connection, but was probably some last minute clean up I forgot to correct before shooting it off to the printer. I appreciate the info, I have already fixed it in my design file so once I know everything else works on the prototype board the final print will be corrected.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Sat, 19 May 2018, 14:24:57
i am currently designing a pcb similar to the atreus. But I don't know how to tilt the parts in the KiCad pcb design software.


Thanks in advance
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Sat, 19 May 2018, 14:30:18
i am currently designing a pcb similar to the atreus. But I don't know how to tilt the parts in the KiCad pcb design software.


Thanks in advance

If you use 'e' to edit the footprint you want rotated, you can select the 'other' radial menu and input the degrees of rotation you need. For example you can get an angled rotation with a value of 450
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Sat, 19 May 2018, 14:54:58
i am currently designing a pcb similar to the atreus. But I don't know how to tilt the parts in the KiCad pcb design software.


Thanks in advance

If you use 'e' to edit the footprint you want rotated, you can select the 'other' radial menu and input the degrees of rotation you need. For example you can get an angled rotation with a value of 450
thank you
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Sun, 20 May 2018, 04:02:33
i am currently designing a pcb similar to the atreus. But I don't know how to tilt the parts in the KiCad pcb design software.


Thanks in advance

If you use 'e' to edit the footprint you want rotated, you can select the 'other' radial menu and input the degrees of rotation you need. For example you can get an angled rotation with a value of 450
How much space do I need to leave between each individual switch ?

Sry for all my qustions
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sun, 20 May 2018, 04:49:39
How much space do I need to leave between each individual switch ?
Depends on the switch size. 1u are 19.05mm (0.75'') away from each other.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Mon, 21 May 2018, 04:15:05
I have to be annoying again. Sorry

When I change the space to 19.05mm between the individual switches they aren't aligned properly anymore. (the collum with K30, K31, K32 .....
https://imgur.com/ysyQhye


Thanks a lot in advance
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Mon, 21 May 2018, 04:34:53
When I change the space to 19.05mm between the individual switches they aren't aligned properly anymore.
I believe it's a sofware limitation. Try putting them in a column then select all of them and rotate them to your liking.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Mon, 21 May 2018, 09:59:56
When I change the space to 19.05mm between the individual switches they aren't aligned properly anymore.
I believe it's a sofware limitation. Try putting them in a column then select all of them and rotate them to your liking.
I can only rotate a group by 90 degrees.
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Mon, 21 May 2018, 14:39:49
When I change the space to 19.05mm between the individual switches they aren't aligned properly anymore.
I believe it's a sofware limitation. Try putting them in a column then select all of them and rotate them to your liking.
I can only rotate a group by 90 degrees.

It's not elegant, but you might be able to go into settings and change the rotation amount globally to whatever you need for the group. As far as I know KiCAD doesn't allow arbitrary rotation of a group of footprints. Google might know better though.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Thu, 24 May 2018, 02:46:52
When I rotated the thumb cluster for the ErgoDox I did it externally from Kicad. I first did the layout in Kicad, saved the file, and then wrote a script that rotated everything by as much as I needed. The Kicad files are fairly easy to manipulate.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Fri, 25 May 2018, 13:18:36
Hello guys

I have managed to rotate the keys. Thanks!!!

But I am back with another question:

I am currently wiring everything up but for some reason, kicad doesn't let me connect some pads from the switches together.

I think a part of the problem is, that the pads, which cannot be connected, are labeled differently. Although it doesn't seem that you are able to rename them (or I haven't found a way yet).

https://imgur.com/a/bbehEHk
In this picture, I am not able to connect The Pad No. 1 from K23 to the Pad No.1 belonging to K24

Thanks in advance
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Fri, 25 May 2018, 13:59:20
Are they connected in your schematic?
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Fri, 25 May 2018, 14:18:33
Are they connected in your schematic?
yes they are.
https://imgur.com/a/ZLW0qIl
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Fri, 25 May 2018, 15:37:20
Are they connected in your schematic?
yes they are.
https://imgur.com/a/ZLW0qIl
Are you on the correct copper layer? Not trying to cross the trace connecting pad 2 to the diode?
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Fri, 25 May 2018, 15:58:24
Are they connected in your schematic?
yes they are.
https://imgur.com/a/ZLW0qIl
Are you on the correct copper layer? Not trying to cross the trace connecting pad 2 to the diode?
no. I am not crossing the diode trace.
Didn't change the layer while connecting the switches
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Fri, 25 May 2018, 17:02:51
no. I am not crossing the diode trace.
Didn't change the layer while connecting the switches

Try connecting on the back copper layer. In the image it shows your active layer is the front copper. Also have you been able to successfully trace other switch pad 1s together?

Might be helpful if you posted your kicad files someone could open and test, if you're comfortable doing that
Title: Re: The Living PCB Design Thread
Post by: evn on Sat, 26 May 2018, 03:24:45
Hi guys, new here.

I've been going through this tutorial: https://github.com/ruiqimao/keyboard-pcb-guide

I have a question about the Crystal. In the tutorial he uses Crystals:crystal_FA238-TSX3225 (https://i.imgur.com/f1WR5VK.png), this exact crystal is not available and none of the libraries he links seem to contain it. I used the closest available crystal I could find: Crystals:Crystal_SMD_SeikoEpson_FA238-4pin_3.2x2.5mm_HandSoldering (https://i.imgur.com/M0uQ0AH.png).

Will this be okay to use instead? There are differences between the two, for example: (https://i.imgur.com/zzTUxxS.png) - here you can see there is 2 GND pads and that he has connected them, whereas in the crystal I'm using: (https://i.imgur.com/zAXujtS.png) - there is only 1 GND pad, the other is unlabelled. Should I try connect pads 3 and 4 anyway?

I did actually find the exact crystal he used in another library, but as this is my first time doing anything like this I don't know if it had been removed for a reason, or they're not manufactured anymore or s/t.

Any advice would be much appreciated
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sat, 26 May 2018, 05:40:14
crystal_FA238-TSX3225
Crystal_SMD_SeikoEpson_FA238-4pin_3.2x2.5mm_HandSoldering
Design-wise they are interchangeable since both are 3225 form factor

There are differences between the two, for example: (https://i.imgur.com/zzTUxxS.png) - here you can see there is 2 GND pads and that he has connected them, whereas in the crystal I'm using: (https://i.imgur.com/zAXujtS.png) - there is only 1 GND pad, the other is unlabelled. Should I try connect pads 3 and 4 anyway?
I've never seen a four pads SMD crystal with only one ground pad. Probably you could simply reassign the pads yourself, although know that, usually, odd pads are connected to capacitors and MCU and even pads are tied to ground.
Title: Re: The Living PCB Design Thread
Post by: evn on Sat, 26 May 2018, 07:16:11
Design-wise they are interchangeable since both are 3225 form factor

I've never seen a four pads SMD crystal with only one ground pad. Probably you could simply reassign the pads yourself, although know that, usually, odd pads are connected to capacitors and MCU and even pads are tied to ground.

Thank you for your reply. So I would be safe using the same crystal as is used in the guide, I won't have any problem finding a compatible part when I start buying the components?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sat, 26 May 2018, 07:30:57
So I would be safe using the same crystal as is used in the guide, I won't have any problem finding a compatible part when I start buying the components?
Yes, you should have no problem as long as your routing is correct.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sat, 26 May 2018, 07:46:27
The datasheet for Epson FA238 indicates it is a regular SMD package crystal. Pin 1 and 3 connects to the crystal, pin 2 and 4 are connected to the cover. A crystal technically does not need to be connected to GND, but you should connect the cover to GND for shielding. The pads are generally also connected through the cover, which means you can use it to jump GND across in a pinch.

The footprints with "handsoldering" in the name generally just have larger pads, sticking further out to make it easier to get to them with an iron. A 3225 crystal package can be a bit tricky to solder with an iron.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Sat, 26 May 2018, 08:10:04
I have managed to connect all rows and columns. But now I cant draw the final connections to the microcontroller.

I would like to share my files but I don't know how to do it  :-[ :blank:
Title: Re: The Living PCB Design Thread
Post by: evn on Sat, 26 May 2018, 08:21:35
Yes, you should have no problem as long as your routing is correct.

Excellent, thank you!

The footprints with "handsoldering" in the name generally just have larger pads, sticking further out to make it easier to get to them with an iron. A 3225 crystal package can be a bit tricky to solder with an iron.

I think I read that somewhere. Someone mentioned using a hot air gun, do you think it would be worth picking up one for this?
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sat, 26 May 2018, 08:35:32
Someone mentioned using a hot air gun, do you think it would be worth picking up one for this?
I bought myself a cheap Baku 858D which seems to be one of a million rebrands, all with the same model name, and it's a game changer for soldering and desoldering crystals and other SMD components.
Title: Re: The Living PCB Design Thread
Post by: evn on Sun, 27 May 2018, 04:51:18
I bought myself a cheap Baku 858D which seems to be one of a million rebrands, all with the same model name, and it's a game changer for soldering and desoldering crystals and other SMD components.

I'll definitely pick one up so, thanks for the recommnedation. My dad will likely find use for it even if I only end up using it once.
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Sun, 27 May 2018, 13:24:09
I bought myself a cheap Baku 858D which seems to be one of a million rebrands, all with the same model name, and it's a game changer for soldering and desoldering crystals and other SMD components.

I'll definitely pick one up so, thanks for the recommnedation. My dad will likely find use for it even if I only end up using it once.

For what it's worth I just soldered the crystal on the board I had made using the same guide and didn't have any trouble using my iron, lots of flux and a magnifying lamp. This  (https://www.digikey.com/products/en?keywords=SER3686CT-ND) is the crystal I ended up using, but I had to find a footprint that matched it's pad layout in it's datasheet  (https://support.epson.biz/td/api/doc_check.php?dl=brief_FA-238V_en.pdf)

But a hot air station would be worth having if you want to do more than just a few boards.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Sun, 27 May 2018, 14:21:57
For some reason, I cant connect the rows and columns to the microcontroller. Moreover, I think I have made a lot of mistakes regarding the microcontroller in general.

These are my project files: https://drive.google.com/open?id=1wRREWIURsWbvziVsqD6W3SwTGTq49Xcd

If someone would like to look at it I would be very thankful. But I don't want to steal your free time.



Thanks in advance!
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Sun, 27 May 2018, 14:41:48
For some reason, I cant connect the rows and columns to the microcontroller. Moreover, I think I have made a lot of mistakes regarding the microcontroller in general.

These are my project files: https://drive.google.com/open?id=1wRREWIURsWbvziVsqD6W3SwTGTq49Xcd

If someone would like to look at it I would be very thankful. But I don't want to steal your free time.



Thanks in advance!

None of your rows or columns on the schematic are connected to the MC. Get those connected and you shouldn't have any troubles. The way I found this out was by turning on your ratsnest and noticing that none of your MC's port pins had connections to any of the switches.

I would recommend spacing out all of your caps and resistors away from the MC, you have a beautiful chunk of space down there to work with, no reason to clump everything together like that, plus soldering will be easier if you give yourself some breathing room. Once you start routing traces you will be happy to have space to manuever everything. I will attach a pic of my MC diagram and you can see how much space I ended up needing, but for a few more switches.

I also want to offer the trace connecting k24 to k29 can be moved down to below R1 and save you from needing to via the trace, while it shouldn't make a performance difference, it will look a lot better!
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Sun, 27 May 2018, 14:59:03
Progress so far on getting my board all soldered up! still have diodes to go but all of the other components are done. Really enjoy soldering SMD more than through-hole.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sun, 27 May 2018, 15:15:39
Progress so far on getting my board all soldered up! still have diodes to go but all of the other components are done. Really enjoy soldering SMD more than through-hole.
Clean soldering, very well done indeed. And I second the feeling on SMD soldering.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Mon, 28 May 2018, 14:20:31
For some reason, I cant connect the rows and columns to the microcontroller. Moreover, I think I have made a lot of mistakes regarding the microcontroller in general.

These are my project files: https://drive.google.com/open?id=1wRREWIURsWbvziVsqD6W3SwTGTq49Xcd

If someone would like to look at it I would be very thankful. But I don't want to steal your free time.



Thanks in advance!

None of your rows or columns on the schematic are connected to the MC. Get those connected and you shouldn't have any troubles. The way I found this out was by turning on your ratsnest and noticing that none of your MC's port pins had connections to any of the switches.

I would recommend spacing out all of your caps and resistors away from the MC, you have a beautiful chunk of space down there to work with, no reason to clump everything together like that, plus soldering will be easier if you give yourself some breathing room. Once you start routing traces you will be happy to have space to manuever everything. I will attach a pic of my MC diagram and you can see how much space I ended up needing, but for a few more switches.

I also want to offer the trace connecting k24 to k29 can be moved down to below R1 and save you from needing to via the trace, while it shouldn't make a performance difference, it will look a lot better!
I have connected them in the schematics but I still can't connect them in pcbnew.
https://drive.google.com/open?id=1oQObxESNTSqrpTEbo2OHkQGIb1yoV09a
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Mon, 28 May 2018, 14:34:20
For some reason, I cant connect the rows and columns to the microcontroller. Moreover, I think I have made a lot of mistakes regarding the microcontroller in general.

These are my project files: https://drive.google.com/open?id=1wRREWIURsWbvziVsqD6W3SwTGTq49Xcd

If someone would like to look at it I would be very thankful. But I don't want to steal your free time.



Thanks in advance!

None of your rows or columns on the schematic are connected to the MC. Get those connected and you shouldn't have any troubles. The way I found this out was by turning on your ratsnest and noticing that none of your MC's port pins had connections to any of the switches.

I would recommend spacing out all of your caps and resistors away from the MC, you have a beautiful chunk of space down there to work with, no reason to clump everything together like that, plus soldering will be easier if you give yourself some breathing room. Once you start routing traces you will be happy to have space to manuever everything. I will attach a pic of my MC diagram and you can see how much space I ended up needing, but for a few more switches.

I also want to offer the trace connecting k24 to k29 can be moved down to below R1 and save you from needing to via the trace, while it shouldn't make a performance difference, it will look a lot better!
I have connected them in the schematics but I still can't connect them in pcbnew.
https://drive.google.com/open?id=1oQObxESNTSqrpTEbo2OHkQGIb1yoV09a

Check your ratsnest in PCBnew, it is still showing no connections to the MC. Which tells me that Pcbnew doesn't know anything changed.

After you make a change to your schematic you will need to generate a new netlist in the schematic viewer and then read the updated netlist in Pcbnew, otherwise pcbnew doesn't know there was an update.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Tue, 29 May 2018, 11:14:41
I connected everything but the control tool shows all kind of mistakes, including some switches that I clearly connected.

I just don't know to progress at this point. :\

https://drive.google.com/open?id=1f5VJ8613EKY711xgIbW3sTmmD2qsVNpS
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Tue, 29 May 2018, 19:13:54
I got everything soldered on, but I can't seem to get my pc to recognize that anything is plugged in. What is the best place to start troubleshooting?
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Wed, 30 May 2018, 00:52:49
I got everything soldered on, but I can't seem to get my pc to recognize that anything is plugged in. What is the best place to start troubleshooting?
drivers?
Title: Re: The Living PCB Design Thread
Post by: hanya on Wed, 30 May 2018, 02:09:16
I connected everything but the control tool shows all kind of mistakes, including some switches that I clearly connected.
You should solve all DRC errors before sending the design to a manufacturer in general.
- Via near track, this error should not happen if you enable DRC while routing new track.
- Track near pad, the same above.
- Two track ends too close, see assigned net of a track you have this error. Tracks assigned to different nets should not be connected each other.
You have some unconnected pins in your schematic. Run rule check on the Eeschema too.
Did you choose Epson TSX3225 for crystal X1? If so, please check its datasheet. Internal crystal of the TSX3225 is connected between pin 1 and 3, not between 1 and 2.
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Wed, 30 May 2018, 14:54:41
I got everything soldered on, but I can't seem to get my pc to recognize that anything is plugged in. What is the best place to start troubleshooting?
drivers?

Looks like I'm not getting continuity across some of my resistors. I am gong to replace and try again. Though with the missed VCC connections I might just have the board reprinted just to eliminate the chance for that to cause issue. I made a few other little design tweaks as well that will work better.. So we'll see.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Thu, 31 May 2018, 10:53:32
Thanks for the help. you guys are awesome!!!

I have got one more question regarding the crystal.

The control tool shows me these two messages regarding the connections of the crystal.
https://imgur.com/a/uIfOVEG
How can I resolve these?

THANKS AGAIN FOR ALL YOUR HELP SO FAR!
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 31 May 2018, 14:35:42
https://imgur.com/a/uIfOVEG
Are you sure about the pads numbering? In my experience odd and even pads should be on a diagonal rather than side by side.

Like so:
(https://i.imgur.com/xTAwetr.png)
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Thu, 31 May 2018, 14:41:28
https://imgur.com/a/uIfOVEG
Are you sure about the pads numbering? In my experience odd and even pads should be on a diagonal rather than side by side.
no I am not sure. Thanks
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Thu, 31 May 2018, 14:44:09
https://imgur.com/a/uIfOVEG
Are you sure about the pads numbering? In my experience odd and even pads should be on a diagonal rather than side by side.
no I am not sure. Thanks
Double check your crystal's datasheet or post it so we can look into it together. If you get the crystal wrong, the board is guaranteed not to work.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Thu, 31 May 2018, 14:52:35
https://imgur.com/a/uIfOVEG
Are you sure about the pads numbering? In my experience odd and even pads should be on a diagonal rather than side by side.
no I am not sure. Thanks
Double check your crystal's datasheet or post it so we can look into it together. If you get the crystal wrong, the board is guaranteed not to work.
Jup I have to change them  :blank:
https://imgur.com/a/iWvz7fI
Title: Re: The Living PCB Design Thread
Post by: evn on Fri, 01 June 2018, 01:45:44
https://imgur.com/a/uIfOVEG
Are you sure about the pads numbering? In my experience odd and even pads should be on a diagonal rather than side by side.
no I am not sure. Thanks
Double check your crystal's datasheet or post it so we can look into it together. If you get the crystal wrong, the board is guaranteed not to work.
Jup I have to change them  :blank:
https://imgur.com/a/iWvz7fI

Are you following ruiqimao's github tutorial? the crystal he uses in the tut doesn't appear to be in any of the libraries he links. I found it in this library: https://github.com/s-light/Crystals_Oscillators_SMD.pretty/
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Fri, 01 June 2018, 02:32:45
https://imgur.com/a/uIfOVEG
Are you sure about the pads numbering? In my experience odd and even pads should be on a diagonal rather than side by side.
no I am not sure. Thanks
Double check your crystal's datasheet or post it so we can look into it together. If you get the crystal wrong, the board is guaranteed not to work.
Jup I have to change them  :blank:
https://imgur.com/a/iWvz7fI

Are you following ruiqimao's github tutorial? the crystal he uses in the tut doesn't appear to be in any of the libraries he links. I found it in this library: https://github.com/s-light/Crystals_Oscillators_SMD.pretty/
wow thanks
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Fri, 01 June 2018, 12:00:18
with the new crystal, it doesn't let me draw the internal pad connections
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Fri, 01 June 2018, 14:13:42
with the new crystal, it doesn't let me draw the internal pad connections

Update your schematic
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Fri, 01 June 2018, 14:16:13
with the new crystal, it doesn't let me draw the internal pad connections
Remember to connect them in the schematic first.
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Fri, 01 June 2018, 14:26:45
Best practice is ANYTIME you change something in Pcbnew you need to check it against your schematic, and then if you need to update your schematic you will also need to generate a new netlist and then, in Pcbnew, to read the newly generated Netlist. Pcbnew can't make any connections that the Netlist from your schematic hasn't told it it can make.

Understanding Pcbnew's dependency on the schematic, and that the Netlist is how the schematic communicates to Pcbnew, is critical.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Fri, 01 June 2018, 16:50:39
with the new crystal, it doesn't let me draw the internal pad connections
Remember to connect them in the schematic first.
I updated the schematic. If I utilize the highlight net tool in pcbnew it shows me that they should be connected. As soon as I connect them the connection disappears.

https://imgur.com/a/2AFCPeO

Sorry for all my questions :-[ :blank:
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Fri, 01 June 2018, 17:07:57
I updated the schematic. If I utilize the highlight net tool in pcbnew it shows me that they should be connected. As soon as I connect them the connection disappears.
https://imgur.com/a/2AFCPeO

Is it the xtal grounds you're trying to connect? Shoot me a link to the files and I'll take a look, the trace you're trying to lay might be coming to close to other pads and it's not letting you lay it. I'll play around with it and see if I can ident the problem
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Fri, 01 June 2018, 17:17:53
I updated the schematic. If I utilize the highlight net tool in pcbnew it shows me that they should be connected. As soon as I connect them the connection disappears.
https://imgur.com/a/2AFCPeO

Is it the xtal grounds you're trying to connect? Shoot me a link to the files and I'll take a look, the trace you're trying to lay might be coming to close to other pads and it's not letting you lay it. I'll play around with it and see if I can ident the problem
Yup the grounds. Thanks a lot for all the support. This community is amazing!
https://drive.google.com/open?id=1mGSo2ln4veV4INIBUW4d-pTSt9_pbd4S
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Fri, 01 June 2018, 17:41:10
Yup the grounds.

I am able to get it to connect, but I have to zigzag the trace a little bit. I highlighted the trace I got to work in yellow, the blue arrow points to where I had to zigzag it a little bit so it wasn't too close to pads 1 or 2 (red X's). It has to be a minimum distance from the pads, I suspect it was giving you trouble because you were trying to route too close to them. There should be dialogue at the bottom of the screen that shows error messages in red when something isn't working (attachment 2). It can be easy to miss and goes away when you click somewhere else.

Let us know if that works.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Fri, 01 June 2018, 17:50:26
Yup the grounds.

I am able to get it to connect, but I have to zigzag the trace a little bit. I highlighted the trace I got to work in yellow, the blue arrow points to where I had to zigzag it a little bit so it wasn't too close to pads 1 or 2 (red X's). It has to be a minimum distance from the pads, I suspect it was giving you trouble because you were trying to route too close to them. There should be dialogue at the bottom of the screen that shows error messages in red when something isn't working (attachment 2). It can be easy to miss and goes away when you click somewhere else.

Let us know if that works.
wow. thank you.
it drove me crazy ;)
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Fri, 01 June 2018, 17:55:26
wow. thank you.
it drove me crazy ;)

That's one of the situations where having parts oriented diagonally can make things just a little but trickier than they need to be.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sat, 02 June 2018, 06:22:20
_ODIN_ put a mark on the silkscreen where your XTAL pad 1 is, it will help you remember the correct orientation in the soldering stage.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sat, 02 June 2018, 13:04:34
_ODIN_ put a mark on the silkscreen where your XTAL pad 1 is, it will help you remember the correct orientation in the soldering stage.

They are actually 180" rotationally symmetric.
Title: Re: The Living PCB Design Thread
Post by: TalkingTree on Sat, 02 June 2018, 13:11:13
_ODIN_ put a mark on the silkscreen where your XTAL pad 1 is, it will help you remember the correct orientation in the soldering stage.

They are actually 180" rotationally symmetric.
Oh, nice to know. Thanks.
Title: Re: The Living PCB Design Thread
Post by: evn on Tue, 05 June 2018, 05:57:42
Hi guys, back with another question. I'm following ruiqimao's tutorial (https://github.com/ruiqimao/keyboard-pcb-guide).

Firstly, my usb footprint (https://i.imgur.com/BrxmgHZ.png) differs from the one in the tutorial (https://i.imgur.com/Y9KTO1S.png) in that there are 2 green GND pads at the top. I wired it exactly as in the tut, ignoring the extra pads, but DRC lists these (https://i.imgur.com/cOfrgj7.png) unconnected pads. I connected all four GND pad 6's together like this (https://i.imgur.com/HLQANAr.png) and that took care of the errors.

Secondly, my C7, C8, & C5 footprints (https://i.imgur.com/6wV2uaQ.png) appear identical to those in the tut (https://i.imgur.com/Bhc63NY.png) but I'm also getting an unconnected pads error (https://i.imgur.com/KczkRlA.png) between C7 GND and U1 pad 5. I wired C7's GND pad to the micro controller's pad 43 GND like so (https://i.imgur.com/CoXzzIY.png), and that took care of this error.

But are these solutions okay? I have little knowledge of electronics/pcb's prior to this project so I really don't know. I'm kinda assuming the GND's just need to be connected.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Tue, 05 June 2018, 06:18:40
Hi guys, back with another question. I'm following ruiqimao's tutorial (https://github.com/ruiqimao/keyboard-pcb-guide).

Firstly, my usb footprint (https://i.imgur.com/BrxmgHZ.png) differs from the one in the tutorial (https://i.imgur.com/Y9KTO1S.png) in that there are 2 green GND pads at the top. I wired it exactly as in the tut, ignoring the extra pads, but DRC lists these (https://i.imgur.com/cOfrgj7.png) unconnected pads. I connected all four GND pad 6's together like this (https://i.imgur.com/HLQANAr.png) and that took care of the errors.

Secondly, my C7, C8, & C5 footprints (https://i.imgur.com/6wV2uaQ.png) appear identical to those in the tut (https://i.imgur.com/Bhc63NY.png) but I'm also getting an unconnected pads error (https://i.imgur.com/KczkRlA.png) between C7 GND and U1 pad 5. I wired C7's GND pad to the micro controller's pad 43 GND like so (https://i.imgur.com/CoXzzIY.png), and that took care of this error.

But are these solutions okay? I have little knowledge of electronics/pcb's prior to this project so I really don't know. I'm kinda assuming the GND's just need to be connected.
Put a ground plane under your pcb and start the test again. It is mentioned in the tutorial
Title: Re: The Living PCB Design Thread
Post by: evn on Tue, 05 June 2018, 06:47:44
Hi guys, back with another question. I'm following ruiqimao's tutorial (https://github.com/ruiqimao/keyboard-pcb-guide).

Firstly, my usb footprint (https://i.imgur.com/BrxmgHZ.png) differs from the one in the tutorial (https://i.imgur.com/Y9KTO1S.png) in that there are 2 green GND pads at the top. I wired it exactly as in the tut, ignoring the extra pads, but DRC lists these (https://i.imgur.com/cOfrgj7.png) unconnected pads. I connected all four GND pad 6's together like this (https://i.imgur.com/HLQANAr.png) and that took care of the errors.

Secondly, my C7, C8, & C5 footprints (https://i.imgur.com/6wV2uaQ.png) appear identical to those in the tut (https://i.imgur.com/Bhc63NY.png) but I'm also getting an unconnected pads error (https://i.imgur.com/KczkRlA.png) between C7 GND and U1 pad 5. I wired C7's GND pad to the micro controller's pad 43 GND like so (https://i.imgur.com/CoXzzIY.png), and that took care of this error.

But are these solutions okay? I have little knowledge of electronics/pcb's prior to this project so I really don't know. I'm kinda assuming the GND's just need to be connected.
Put a ground plane under your pcb and start the test again. It is mentioned in the tutorial

I do have the ground planes (https://i.imgur.com/Ab3qdQw.png) set up, as per the tutorial. However I did end up with (https://i.imgur.com/LoOXiUy.png) more large red areas which I assume are 'missing ground planes' than he has in the tutorial (https://camo.githubusercontent.com/d6f5e0289cb60fb3cf121c5c4df234401a7613cd/68747470733a2f2f7075752e73682f746c5236492f623439643838376631362e706e67), which I was not sure what to do with.
Title: Re: The Living PCB Design Thread
Post by: jmdaly on Tue, 05 June 2018, 08:29:18
I do have the ground planes (https://i.imgur.com/Ab3qdQw.png) set up, as per the tutorial. However I did end up with (https://i.imgur.com/LoOXiUy.png) more large red areas which I assume are 'missing ground planes' than he has in the tutorial (https://camo.githubusercontent.com/d6f5e0289cb60fb3cf121c5c4df234401a7613cd/68747470733a2f2f7075752e73682f746c5236492f623439643838376631362e706e67), which I was not sure what to do with.

Those red areas you see show that you have ground plane on one side of the board, but not the other. The trick to getting the ground plane over to the other side is to do via stitching. I followed https://forum.kicad.info/t/protip-nicer-via-stitching/1103 (https://forum.kicad.info/t/protip-nicer-via-stitching/1103) to do my via stitching.
Title: Re: The Living PCB Design Thread
Post by: evn on Tue, 05 June 2018, 12:02:26
Those red areas you see show that you have ground plane on one side of the board, but not the other. The trick to getting the ground plane over to the other side is to do via stitching. I followed https://forum.kicad.info/t/protip-nicer-via-stitching/1103 (https://forum.kicad.info/t/protip-nicer-via-stitching/1103) to do my via stitching.

Thanks! That actually worked out great https://i.imgur.com/qB1Fjyp.png
Title: Re: The Living PCB Design Thread
Post by: jmdaly on Tue, 05 June 2018, 12:06:58
Those red areas you see show that you have ground plane on one side of the board, but not the other. The trick to getting the ground plane over to the other side is to do via stitching. I followed https://forum.kicad.info/t/protip-nicer-via-stitching/1103 (https://forum.kicad.info/t/protip-nicer-via-stitching/1103) to do my via stitching.

Thanks! That actually worked out great https://i.imgur.com/qB1Fjyp.png

Great, I'm glad it helped!
Title: Re: The Living PCB Design Thread
Post by: evn on Tue, 05 June 2018, 16:40:22
Okay I think this design is about ready to be scrutinised. Would someone be willing to have a look over my kicad files and point out any mistakes/errors? They're available here (https://github.com/evindarling/Ergowing-PCB).
Title: Re: The Living PCB Design Thread
Post by: hanya on Tue, 05 June 2018, 19:14:58
Okay I think this design is about ready to be scrutinised. Would someone be willing to have a look over my kicad files and point out any mistakes/errors? They're available here (https://github.com/evindarling/Ergowing-PCB).
Hi,
- It is hard to solder through hole diodes under the switches. But it is OK if your switch having hole which allows you to put a diode on the case of the switch.
- In your design rules, you have 0.6 mm via dia and 0.4 mm via drill. This means 0.1 mm annular ring of via. I suppose you to make larger annular ring to match the design rule of the PCB manufacturer which you have choosen.
- If you want to make reference of some parts clear, place references away from pads and vias.
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Wed, 06 June 2018, 02:55:50
Okay I think this design is about ready to be scrutinised. Would someone be willing to have a look over my kicad files and point out any mistakes/errors? They're available here (https://github.com/evindarling/Ergowing-PCB).

I would recommend not running USB through vias where you can help it, and avoid 'T' junctions for your traces, you don't want hard 90deg angles.
Title: Re: The Living PCB Design Thread
Post by: evn on Wed, 06 June 2018, 07:23:55

I would recommend not running USB through vias where you can help it, and avoid 'T' junctions for your traces, you don't want hard 90deg angles.

I should be able to change the traces to avoid vias from the USB and remove 90deg angles without too much hassle. Thanks for your input! Do you know if wiring these 3 pads on the USB like this (https://i.imgur.com/u9jXBkT.png) is okay? It isn't in the tut to do it, I just did it to get rid of an unconnected pads error.

Hi,
- It is hard to solder through hole diodes under the switches. But it is OK if your switch having hole which allows you to put a diode on the case of the switch.
- In your design rules, you have 0.6 mm via dia and 0.4 mm via drill. This means 0.1 mm annular ring of via. I suppose you to make larger annular ring to match the design rule of the PCB manufacturer which you have choosen.
- If you want to make reference of some parts clear, place references away from pads and vias.

- In the tutorial I followed he mentions that this diode placement only works for SMD diodes, so I'm gonna get SMD ones for this. That should be okay as I think the SMD diodes go on the other side, right?
- I haven't even looked into PCB manufacters yet, I'm going to do that now. Thanks for your help!
Title: Re: The Living PCB Design Thread
Post by: dead_pixel_design on Wed, 06 June 2018, 15:43:38
Running the ground trace like that isn't a problem, but might be redundant since those pads will connect through the layers and ground.

SMD will be fine, no issues there, the diodes and switches are on different sides of the board so if you use SMD you won't run into problems.

The cheapest place I have found for getting a PCB printed was at https://jlcpcb.com/quote, but my pcb shape and size were normalish, I don't know how your PCB shape will affect costs.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Wed, 13 June 2018, 15:02:20
Do you know a good online shop located in Europe to by the components, like diodes and the controller, from?

Title: Re: The Living PCB Design Thread
Post by: Croktopus on Fri, 22 June 2018, 06:41:05
Hey, does anyone have an SMK 2nd gen footprint on hand? I sent out a couple PMs to people selling SMK boards and haven't heard back yet, so I figured I'd ask here
Title: Re: The Living PCB Design Thread
Post by: Tech22 on Fri, 22 June 2018, 13:43:59
Hello. I want to use this type c pro micro controller with a custom pcb found at https://tinyurl.com/yby9bd42

How would I go about making the PCB to work with that? I am also confused on how I bridge each switch with the traces etc. I am using KiCad and my layout can be found at https://tinyurl.com/y9b6oftl

Thank you.
Title: Re: The Living PCB Design Thread
Post by: MandrewDavis on Fri, 22 June 2018, 17:29:24
Hey, does anyone have an SMK 2nd gen footprint on hand? I sent out a couple PMs to people selling SMK boards and haven't heard back yet, so I figured I'd ask here

I don't know if all 2nd gen SMK switches have the same pin spacing, but Scott who runs www.lfkeyboards.com was cool enough to post all his keyboard footprints on GitHub (https://github.com/lfkeyboards/public/tree/master/lfk-modules/Keyboard.pretty).
Title: Re: The Living PCB Design Thread
Post by: Croktopus on Sat, 23 June 2018, 03:55:55
thank you so much mandrew!
Title: Re: The Living PCB Design Thread
Post by: MandrewDavis on Mon, 25 June 2018, 09:49:25
First of all, thank you for everyone who checked my schematic and gave me advice on my last project (https://geekhack.org/index.php?topic=45456.msg2627518#msg2627518), it ended up working out great.

Currently, I am trying to create an AEK compatible PCB for the KBDFans KBD66 based on Hasu's Alps64 (https://github.com/kairyu/tmk_keyboard_custom/tree/master/keyboard) project. Due to a deficiency of pins, I placed solder jumpers so there is choice between having the reset LED or split-backspace and a third key to the right of the spacebar (neither of which I will use). Can anyone tell me if this is alright since I am about to send this out for fabrication.

Also, anyone have Alps64 parts on hand and can do the SMD work? Otherwise, I'll just buy a cheapo 858D.
Title: Re: The Living PCB Design Thread
Post by: Croktopus on Fri, 29 June 2018, 02:34:19
id really like to add a volume wheel of some sort (like a knob from a car stereo, or a rolling design, or whatever really), but i have no idea how. has anyone here done something like that before?
Title: Re: The Living PCB Design Thread
Post by: senso on Mon, 02 July 2018, 04:25:21
Hardware wise, an encoder is what you want, lots of styles to choose from.
Title: Re: The Living PCB Design Thread
Post by: Nixon on Thu, 26 July 2018, 03:16:21
Designing a 39 key board using the new Kailh Chocs, similar to the Planck but 10 keys wide instead of 12. First complex design in Eagle so I thought I'd better upload it here to see if anyone can spot something I've done wrong. I know I've wasted space by mounting the Arduino Pro Micro behind and not underneath the keys, but wanted a pen tray so got space in the case and it made laying traces a whole lot easier. Will add mounting holes and a ground plane but just want to check that my progress so far is all good.

Edit: Here's the parts library for Eagle with the Kailh Choc in: https://github.com/skullydazed/clueboard_eagle
Title: Re: The Living PCB Design Thread
Post by: marhalloweenvt on Thu, 26 July 2018, 05:16:32
Designing a 39 key board using the new Kailh Chocs, similar to the Planck but 10 keys wide instead of 12. First complex design in Eagle so I thought I'd better upload it here to see if anyone can spot something I've done wrong. I know I've wasted space by mounting the Arduino Pro Micro behind and not underneath the keys, but wanted a pen tray so got space in the case and it made laying traces a whole lot easier. Will add mounting holes and a ground plane but just want to check that my progress so far is all good.

Edit: Here's the parts library for Eagle with the Kailh Choc in: https://github.com/skullydazed/clueboard_eagle

So far, your work is still good. But i think you should put column pins in 1 side and row pins in other side of pro micro for easy to debug if there would be errors.
Title: Re: The Living PCB Design Thread
Post by: MandrewDavis on Wed, 08 August 2018, 15:28:55
I am a bit confused by everyone grouping the capacitors off to the side. I have been looking at the Teensy 2.0 schematic and TalkingTree's GH80-3000 PCB for reference. When using the ATmega32u4, do I need a 1μF capacitor on both the UVCC and VBUS lines? Also, does it matter whether I be put the 22Ω resistors for the D+ and D- lines near the MCU or USB port?  I've read the capacitor on pin 42 (AREF) is optional.

Done with this PCB so this is what I have (minus the ground plane).

(https://i.imgur.com/lxDMkSo.jpg)

(https://i.imgur.com/QrmT8d3.jpg)
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Fri, 10 August 2018, 09:10:27
Aref is optional altogether if you're not doing analog readings. I believe you should leave it unconnected if not used.

You need a 1uF cap on Ucap.

It's recommended to put the 22Ω resistors close to the pins.

It's recommended to have one 100nF cap close to each VCC pin, it's probably also advisable to have some bulkier capacitances close to the chip, as well as a big bulk capacitor over the VCC to GND pins. You should keep the total capacitance below 10uF to comply with the USB spec.

Decoupling is a complicated subject, and you are most probably better off overkilling it.
Title: Re: The Living PCB Design Thread
Post by: AresTheGod on Sat, 11 August 2018, 17:19:56
First time using KiCad, but I'd like to create an on-board per keys RGB TKL pcb with multiple layouts available with USB Type C connector. I've read loads of thing about how to design PCB but almost none of them mention how to add per keys RGB. So far, the closest thing I've seen to what I'd like to do would be this https://easyeda.com/IBNobody/Matias_RGB_TKL_copy-2d2fab1805ff4c39b05c490e5ca4c47c?authenticate=force# . However, it doesn't meet every one of my requirements. I'm also not sure which controller I should use as I've seen people talking about a lot of different controllers such as the ATmega32u4 and the Teensy++ 2.0 .
Here's what I've done so far since I don't really understand which/where should I put the RBG led in here [attachimg=1]
Title: Re: The Living PCB Design Thread
Post by: ErgoMacros on Sat, 11 August 2018, 18:30:55
Hi,
I can't help with the RGB LEDs (sorry), but in terms of what micro controller board to use
start with your input/output pin requirements.

These will be something like:
  x = number of columns
  y = number of rows
  l  = number of indicator LEDs (caps lock, numb lock...)
  u = number of pins to talk to your RGB array

So you might need something like:
   17
+  6
+  0 or 3? Not sure about this count
+  3 or whatever you want
----
  29 or so available pins on your controller, minimum

Teensy++ 2.0 has lots (37!)
Pro Micro has 18.

You can get away with fewer by either adding hardware (chips) for things like multiplexing (http://www.openmusiclabs.com/learning/digital/input-scanning-matrix/shift-brigade/index.html) or creating more complex matrixes.

Your 17 x  6 keyboard, minus 11 blank key slots = 91 keys. A 10 x 10 matrix will cover 100 keys so if you wanted to create a "complex" matrix 20 pins would do (instead of 17+6 = 23)
Title: Re: The Living PCB Design Thread
Post by: AresTheGod on Sun, 12 August 2018, 03:59:30
So if I understood what you're saying, the pros of having a "complex" matrix would be to use fewer pins and the cons would be the "complex" part? Are the pros worth the cons? And the "complex" matrix would look like that? [attach=1]
Title: Re: The Living PCB Design Thread
Post by: ErgoMacros on Sun, 12 August 2018, 13:34:16
Yes, exactly.
The pros of fewer pins are
* cheaper processor. . If you're producing millions of keyboards, and the larger (more pins) processor costs $1 more, it's probably worth it to design for the cheaper processor.
* for 1 keyboard the price difference is negligible.
* if the real estate on the PCB were very limited for some reason, having a physically smaller processor (fewer pins) could help.

The cons of fewer pins are
* not every key on keyboard row 0 would go to the same processor pin. So every time you wanted to know which 2 pins went to key you'd have to do a mental translation between the physical location and the microprocessor pins.
* The advantage of more pins is that the matrix is laid out just as you first posted. Each key maps to the same pins as it's neighbors.
This makes the keymap simpler, easier to "grok" as you change the key assignments.

Title: Re: The Living PCB Design Thread
Post by: AresTheGod on Sun, 12 August 2018, 14:08:21
Ok I see, thank you!
But by the way, since we’re using a Teensy controller, why not using the lastest? I saw a Teensy 3.6 somewhere and it had even more pins that the Teensy 2.0++. Would it also be overkill for a keyboard and be more expensive that it should be? Because it seems that nobody is using these newer version of Teensy.
Title: Re: The Living PCB Design Thread
Post by: MandrewDavis on Sat, 18 August 2018, 22:00:36
Aref is optional altogether if you're not doing analog readings. I believe you should leave it unconnected if not used.

You need a 1uF cap on Ucap.

It's recommended to put the 22Ω resistors close to the pins.

It's recommended to have one 100nF cap close to each VCC pin, it's probably also advisable to have some bulkier capacitances close to the chip, as well as a big bulk capacitor over the VCC to GND pins. You should keep the total capacitance below 10uF to comply with the USB spec.

Decoupling is a complicated subject, and you are most probably better off overkilling it.

Thank you once again for such a detailed response. I do have the 1uF capacitor on UCAP and will remove the on AREF, but other than than does everything look good? When you say VCC, does that only include just the pins 14 and 34 or the UVCC, VBUS and AVCC pins too?
Title: Re: The Living PCB Design Thread
Post by: hanya on Sun, 19 August 2018, 00:49:18
But by the way, since we’re using a Teensy controller, why not using the lastest? I saw a Teensy 3.6 somewhere and it had even more pins that the Teensy 2.0++. Would it also be overkill for a keyboard and be more expensive that it should be? Because it seems that nobody is using these newer version of Teensy.
Not so many people designs full size keyboard which requires many pins. If you design such PCB, you can put MCU on your board directly. No need to put external board.
If you use RGB LED contains own controller such as SK6812, its V_HIGH is 3.4V on 5V circuit. Teensy 3.6 works on 3.3V and it might not work with the LED. Most of them might work well even with 3.3V but some might not work.
Not only the price of the board but components on your circuit is also important to choose target MCU. You can use level converter between 5V and 3V system if you really needed.
Title: Re: The Living PCB Design Thread
Post by: _ODIN_ on Sun, 26 August 2018, 08:34:55
hello guys, do you know where to get the kicad footprint of this component? http://www.kailhswitch.com/uploads/201815927/PG151101S11.pdf
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Tue, 28 August 2018, 06:03:36
Thank you once again for such a detailed response. I do have the 1uF capacitor on UCAP and will remove the on AREF, but other than than does everything look good? When you say VCC, does that only include just the pins 14 and 34 or the UVCC, VBUS and AVCC pins too?

Slow response, but the answer improved from it I believe =) When you are doing a simple design powered through USB with 5V IO everything VCC is the same. There are some different scenarios in the chapter " USB Module Powering Options" in the datasheet http://ww1.microchip.com/downloads/en/DeviceDoc/doc7799.pdf
Title: Re: The Living PCB Design Thread
Post by: CameronBanna on Tue, 04 September 2018, 00:27:09
hello guys, do you know where to get the kicad footprint of this component? http://www.kailhswitch.com/uploads/201815927/PG151101S11.pdf

If you google search "kailh socket kicad" you can find quite a few.
Heres one for example. https://github.com/daprice/keyswitches.pretty
Title: Re: The Living PCB Design Thread
Post by: MandrewDavis on Wed, 05 September 2018, 21:56:28
Thank you once again for such a detailed response. I do have the 1μF capacitor on UCAP and will remove the on AREF, but other than than does everything look good? When you say VCC, does that only include just the pins 14 and 34 or the UVCC, VBUS and AVCC pins too?

Slow response, but the answer improved from it I believe =) When you are doing a simple design powered through USB with 5V IO everything VCC is the same. There are some different scenarios in the chapter " USB Module Powering Options" in the datasheet http://ww1.microchip.com/downloads/en/DeviceDoc/doc7799.pdf

Thanks, must have missed all that when looking through the 32u4 files, added a 1μF capacitor to VBUS. I'll have this off to fab once I get the USB port measurements coordinated with the case.
Title: Re: The Living PCB Design Thread
Post by: Moosewing on Wed, 12 September 2018, 15:34:52
Hoping to order a prototype within the next few days, but I'd like to run it by someone first.

Schematic and BOM:
(https://i.imgur.com/7vDeZj7.png)
(https://i.imgur.com/FTGlLA2.png)

I know it's bad practice but I didn't put the switch matrix in the schematic because it was constantly changing up until the end and I didn't want to bother editing the schematic after every little change. I'll be better about this in the future, I promise.

Full board pics:
(https://i.imgur.com/Gb5WjHn.png)
(https://i.imgur.com/nfRvL2e.png)

This PCB is going to be used for a few different projects involving Omron B3G-S and KPT switches. The outermost pins in these switches are connected internally, so it's easy to go row2col and keep it (mostly) on one layer. I originally had it wired col2row until I opened up my FK-555 and noticed this pattern on its PCB.

MCU pics:
(https://i.imgur.com/rW2VvxH.png)
(https://i.imgur.com/q3HIOMg.png)

I only just realized as I was making this post that I forgot to connect the bottom left VCC pin to the rest of the VCC pins. That aside, I have a few questions.
Does it matter which VCC pin is connected to the USB port since they're all connected anyway? I have mine connected to uVCC but a lot of boards I've seen have it connected to VBUS.
I have a ground plane on each layer, connected together by the mounting holes. Are those enough, or should I add some via stitches elsewhere?
How should I go about connecting the isolated copper islands under the MCU and by C1 and C4/R3? I have a via on each section just to mark and identify which ones need to be connected, but beyond that I'm not sure. And of course, if anything else needs to be changed, I'm all ears.
Title: Re: The Living PCB Design Thread
Post by: RealLaugh on Fri, 14 September 2018, 00:38:47
it might be the software you're using but I don't see the 2 other pins (2 and 4) on the quartz going to GND?

More
Hoping to order a prototype within the next few days, but I'd like to run it by someone first.

Schematic and BOM:
Show Image
(https://i.imgur.com/7vDeZj7.png)

Show Image
(https://i.imgur.com/FTGlLA2.png)


I know it's bad practice but I didn't put the switch matrix in the schematic because it was constantly changing up until the end and I didn't want to bother editing the schematic after every little change. I'll be better about this in the future, I promise.

Full board pics:
Show Image
(https://i.imgur.com/Gb5WjHn.png)

Show Image
(https://i.imgur.com/nfRvL2e.png)


This PCB is going to be used for a few different projects involving Omron B3G-S and KPT switches. The outermost pins in these switches are connected internally, so it's easy to go row2col and keep it (mostly) on one layer. I originally had it wired col2row until I opened up my FK-555 and noticed this pattern on its PCB.

MCU pics:
Show Image
(https://i.imgur.com/rW2VvxH.png)

Show Image
(https://i.imgur.com/q3HIOMg.png)


I only just realized as I was making this post that I forgot to connect the bottom left VCC pin to the rest of the VCC pins. That aside, I have a few questions.
Does it matter which VCC pin is connected to the USB port since they're all connected anyway? I have mine connected to uVCC but a lot of boards I've seen have it connected to VBUS.
I have a ground plane on each layer, connected together by the mounting holes. Are those enough, or should I add some via stitches elsewhere?
How should I go about connecting the isolated copper islands under the MCU and by C1 and C4/R3? I have a via on each section just to mark and identify which ones need to be connected, but beyond that I'm not sure. And of course, if anything else needs to be changed, I'm all ears.
Title: Re: The Living PCB Design Thread
Post by: Moosewing on Fri, 14 September 2018, 10:31:10
it might be the software you're using but I don't see the 2 other pins (2 and 4) on the quartz going to GND?

2 and 4 are connected together, and then 2 is connected to the ground plane. I'll go ahead and connect it manually to the ground pads on the capacitors though.
Title: Re: The Living PCB Design Thread
Post by: online on Wed, 19 September 2018, 10:18:59
Hi everyone,

I'm trying to design a pcb with atmega32u4 by following the pcb design guide on github. Got some pcbs made.
Soldered 4-5 of them but all have the same problem.
When it connected to PC (Windows 10), it recognised as 32u4 and detected by Atmel flip as well. However, after it plugged in for around 15mins, it disconnected by itself. It continue failed to be recognized after I reconnect it.

It happened with or without firmware flashed-in. I checked all pins are not shorted.

I set all trace to width to 6.30mil(0.16mm) and realised the VCC trace width is too thin after I sent the file to the manufacturer, could this be the problem?

Here is the schematic and PCB. Please help. :(
[attachimg=1]
[attachimg=2]
Title: Re: The Living PCB Design Thread
Post by: tedfs3 on Sun, 23 September 2018, 19:50:24
Has anyone done up KiCad footprints and symbols for Kailh BOX switches or do the MX footprints suffice ? I'm not entirely clear if the nubs on the switch need to sit ON the PCB or if they sit down IN the PCB.
Title: Re: The Living PCB Design Thread
Post by: senso on Tue, 25 September 2018, 05:38:53
Hi everyone,

I'm trying to design a pcb with atmega32u4 by following the pcb design guide on github. Got some pcbs made.
Soldered 4-5 of them but all have the same problem.
When it connected to PC (Windows 10), it recognised as 32u4 and detected by Atmel flip as well. However, after it plugged in for around 15mins, it disconnected by itself. It continue failed to be recognized after I reconnect it.

It happened with or without firmware flashed-in. I checked all pins are not shorted.

I set all trace to width to 6.30mil(0.16mm) and realised the VCC trace width is too thin after I sent the file to the manufacturer, could this be the problem?

Here is the schematic and PCB. Please help. :(
(Attachment Link)
(Attachment Link)

Your decoupling caps are in a nice row, miles away from the micro-controller.

Traces are too thin as you said.

No ground plane, ground is horrible as well, and it seems like your bypass caps ground is not connected to anything
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Tue, 25 September 2018, 07:53:38
and it seems like your bypass caps ground is not connected to anything

Good spotted, I didn't catch that. Which also would mean the oscillator caps are not connected to GND either. The oscillator circuit layout in whole is questionable as well I'd say.

It's hard not to sound harsh about it, but did you read up anything at all on circuit design?
Title: Re: The Living PCB Design Thread
Post by: Findecanor on Tue, 25 September 2018, 14:13:41
(Attachment Link)
BTW. I see quite a few junctions between rows and columns in that matrix. (I suppose you would have spotted and corrected those yourself by now, but anyway...)
Title: Re: The Living PCB Design Thread
Post by: N9vem on Fri, 05 October 2018, 17:16:41
Hi!
Are there someone who designed a pcb for RAFI RS 76 C switches? Can hall effect switches be compatible with QMK? I'm only briefly run trough the rafi schematics and I'm not good enough / I don't have time enough to design a pcb for 76 C switches yet, but its one of my further goals. Does somebody encountered Marquardt Two Fingers Typewriter switches, is it worth the time to design a pcb for them (for those great doubleshot keycaps)?
Thanks!
Title: Re: The Living PCB Design Thread
Post by: LifeZ on Thu, 18 October 2018, 20:02:49
Hello guys,  ;D
I am going to study artwork.
It is not easy because there is no knowledge about electronics.
I use Altium.
I just want to follow various things.
Title: Re: The Living PCB Design Thread
Post by: online on Sun, 21 October 2018, 07:11:37
Hi everyone,

I'm trying to design a pcb with atmega32u4 by following the pcb design guide on github. Got some pcbs made.
Soldered 4-5 of them but all have the same problem.
When it connected to PC (Windows 10), it recognised as 32u4 and detected by Atmel flip as well. However, after it plugged in for around 15mins, it disconnected by itself. It continue failed to be recognized after I reconnect it.

It happened with or without firmware flashed-in. I checked all pins are not shorted.

I set all trace to width to 6.30mil(0.16mm) and realised the VCC trace width is too thin after I sent the file to the manufacturer, could this be the problem?

Here is the schematic and PCB. Please help. :(
(Attachment Link)
(Attachment Link)

Your decoupling caps are in a nice row, miles away from the micro-controller.

Traces are too thin as you said.

No ground plane, ground is horrible as well, and it seems like your bypass caps ground is not connected to anything

Thanks for your help. I've re-designed another test board based on your suggestion and it works! :)

and it seems like your bypass caps ground is not connected to anything

Good spotted, I didn't catch that. Which also would mean the oscillator caps are not connected to GND either. The oscillator circuit layout in whole is questionable as well I'd say.

It's hard not to sound harsh about it, but did you read up anything at all on circuit design?

I'm a total noob when it comes to circuit design, I read ruiqimao keyboard pcb design guide and also bits of info from everywhere.
atm, I'm just copying people's design and modify the layout to fit my need, didn't realise it's not as straightforward as I wish to be.

Didn't know the decoupling caps need to be placed near the IC.  :-\

PCB layer is filled with ground plane, is this a correct way to ground oscillator?


Here is another test board which is working, but any suggestion on improvement will be appreciated.
[attach=1]
[attach=2]
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Tue, 23 October 2018, 09:51:53
That looks a lot better =)

I would rotate the controller 180° to route the USB lines shorter. Everything else should be equally easy to route that way. There is no reason not to move C4 closer to its VCC pin. You could move C3,7,8 closer to the chip as well.

I never used an external pull-up resistor on the reset pin, and I never had any problems without one. I would just drop R1 completely.

I would rotate C6 to have its axis pointing towards the controller (like the other caps and resistors), but that's just personal preference.
Title: Re: The Living PCB Design Thread
Post by: marhalloweenvt on Tue, 23 October 2018, 22:42:15
Hello,

I am designing my PCB with Kicad. Could you guys please give me some advices/tips in how to route track? For now, my tracks on pcb are a mesh. I just want to make them as beautiful as you guys did.
I am very appreciated with every single advice/tip you guys can give me.
Title: Couple of questions about Teensy 2.0 connections on Ergodox
Post by: jayvee on Thu, 20 December 2018, 03:26:34
Hi,

I am trying to design my own split mechanical keyboard. For reference purpose, I am depending upon the design of Ergodox from github repository https://github.com/Ergodox-io/ErgoDox

Please find here the Teensy in the circuit diagram.
[attach=1]

Does anyone know why PB4 of Teensy is connected to Vcc and why PD6 is connected to ground?

If these are unused pins like PC7, PD4, PD5, PD7 and PE6, then they should not be connected anywhere else.

Thanks.
Title: Re: Couple of questions about Teensy 2.0 connections on Ergodox
Post by: jayvee on Fri, 21 December 2018, 02:33:16
Hi,

I am trying to design my own split mechanical keyboard. For reference purpose, I am depending upon the design of Ergodox from github repository https://github.com/Ergodox-io/ErgoDox

Please find here the Teensy in the circuit diagram.
(Attachment Link)

Does anyone know why PB4 of Teensy is connected to Vcc and why PD6 is connected to ground?

If these are unused pins like PC7, PD4, PD5, PD7 and PE6, then they should not be connected anywhere else.

+ Attachments and other options
Verification:
Thanks.

I looked at the Teensy 2.0 circuit (attached below) and found that D6 is connected to an LED and 1K Resistor and then connected to ground. This may be the reason about PD6 in Ergodox circuit shown as connected to ground.

Does this mean PD6 is effectively not available for either row or column purpose in a keyboard?

[attach=1]
Title: Re: Couple of questions about Teensy 2.0 connections on Ergodox
Post by: jayvee on Fri, 21 December 2018, 04:46:40
Hi,

I am trying to design my own split mechanical keyboard. For reference purpose, I am depending upon the design of Ergodox from github repository https://github.com/Ergodox-io/ErgoDox

Please find here the Teensy in the circuit diagram.
(Attachment Link)

Does anyone know why PB4 of Teensy is connected to Vcc and why PD6 is connected to ground?

If these are unused pins like PC7, PD4, PD5, PD7 and PE6, then they should not be connected anywhere else.

+ Attachments and other options
Verification:
Thanks.

I looked at the Teensy 2.0 circuit (attached below) and found that D6 is connected to an LED and 1K Resistor and then connected to ground. This may be the reason about PD6 in Ergodox circuit shown as connected to ground.

Does this mean PD6 is effectively not available for either row or column purpose in a keyboard?

(Attachment Link)

I will just use PD6 for lighting up one of my status LEDs such as NumLock LED. Hope it can light up two LEDs together (one on the Teensy board and one on my prototype breadboard).

I am still clueless about PB4 of Teensy connected to Vcc. For now, I am ignoring it and plan to use it as in I/O for one of the rows on Left Hand Side keypad.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sun, 23 December 2018, 13:39:52
Hi,

I am trying to design my own split mechanical keyboard. For reference purpose, I am depending upon the design of Ergodox from github repository https://github.com/Ergodox-io/ErgoDox

Please find here the Teensy in the circuit diagram.
(Attachment Link)

Does anyone know why PB4 of Teensy is connected to Vcc and why PD6 is connected to ground?

If these are unused pins like PC7, PD4, PD5, PD7 and PE6, then they should not be connected anywhere else.

Thanks.

Bizarre reasons! Reason enough? ;) =D

Ok, so that was my doing. And the explanation is probably not super easy to think up on your own. It has to do with the flip-ability of the PCB. There's no reason to connect PB4 to VCC (or PD6 tp GND), and you probably should avoid to. The reason is that the pads doubles as VCC/GND pads for a decoupling capacitor for the IO expander.

So it was mostly a technicality to get it into KiCAD.
Title: Re: The Living PCB Design Thread
Post by: jayvee on Tue, 01 January 2019, 05:14:03
Bizarre reasons! Reason enough? ;) =D

Ok, so that was my doing. And the explanation is probably not super easy to think up on your own. It has to do with the flip-ability of the PCB. There's no reason to connect PB4 to VCC (or PD6 tp GND), and you probably should avoid to. The reason is that the pads doubles as VCC/GND pads for a decoupling capacitor for the IO expander.

So it was mostly a technicality to get it into KiCAD.

Thanks for the explanation! This means PB4 and PD6 are free and available for IO purposes. I will use PD6 to light up an LED as it has PWM support. And can use PB4 as one of the I/O lines.
In my case the two PCBs are distinct and so most likely I will not face the design issue you were facing.
Great!
Title: Re: The Living PCB Design Thread
Post by: kuerb on Thu, 03 January 2019, 05:37:04
Hi,
I'm currently trying to build my own full size keyboard with a custom layout. After reading through the whole thread (I actually just made an account so subscribe to this thread  ^-^) I still have some questions:


Thanks a lot.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Thu, 03 January 2019, 16:41:16
Hi,
I'm currently trying to build my own full size keyboard with a custom layout. After reading through the whole thread (I actually just made an account so subscribe to this thread  ^-^) I still have some questions:

  • I've read that you should not place traces below the oscillator and surround it by a ground plane. Is that only specific to that layer or should I keep the traces on all layers away from the crystal?
  • I want to use a ceramic resonator. Do these even have the same issues with interference as crystals?
  • Originally I wanted to add LED backlighting but now I'm unsure: At >100 LEDs in parallel, drawing 20mA each, thats more than 2A (and therefore more than the 500/900mA USB provides and way more than the 20/100mA the Atmega32u4 can drain). What are the tricks to get low power LED backlighting?

Thanks a lot.

1. The surrounding ground would be to shield off the crystal. Preferably a plane underneath it, and a ring off GND around it.
2. Ceramic oscillators may not be stable enough to work properly with USB.
3. You don't want 100 LEDs driven at 20mA each continuously at the same time. You would be blind. A few mA probably is enough, but you would still need to be careful in the design to meet the current limits.
Title: Re: The Living PCB Design Thread
Post by: kuerb on Fri, 04 January 2019, 08:53:10
 Thank you for the response.

@1&2) I designed the PCB around the Adafruit Feather 32u4 Bluefruit LE (https://learn.adafruit.com/adafruit-feather-32u4-bluefruit-le/overview) because that already works with QMK. I guess I'll think about switching to a quartz. But then I'd have to retrace a lot of wires for the extra caps and bigger component :eek:

@3) Now I feel stupid about the LEDs ;D I only thought about reducing the duty cycle to keep the overall power consumption low and didn't even think about what would happen if I connected the LEDs to a low current power supply (resembling the pin).

I just tried a setup of 25 parallel green* LEDs. With 5 mA on the power supply (that should be equal to 100LEDs@20mA) each LED still gets to around 180 uA but the power supply is also lowering the voltage to 2.2V. But at least the LEDs stay visible with artificial lighting. With keycaps on the LEDs, they're only visible in the dark but that might be just enough for a very subtle backlight. Powering the LEDs through a Teensy (LC) was also possible but with a bit of flickering.
*or rather the green parts of RGB LEDs

I might hold back on adding per-key backlighting and just add a few dedicated LEDs instead. I can always upscale for later projects :))
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sat, 05 January 2019, 14:35:51
1&2. I haven't looked too hard but I couldn't find out what the part used actually is. According to the datasheet the 32u4 should have an internal oscillator that's supposedly possible to trim to make it good enough for USB But there's very much not a promise in there that a resonator will be good enough in general.

3. It's not a fantastic idea to just parallel up LEDs, google for thermal runaway. And you'd probably want to drive them through something else than the micro, a dedicated LED driver or simply with transistors.

3++. Using a switching regulator to lower the voltage for the LEDs can save a lot of the power consumption. You should probably still really have a current limiting resistor in series with the LED. but you can shift more of the power to be dropped actually producing light.
Title: Re: The Living PCB Design Thread
Post by: kuerb on Wed, 09 January 2019, 08:14:32
@3) I know that parallel LEDs weren't the best idea, I just wanted to test the output before scrapping the idea of LED backlighting. But in the end I removed all of the backlight LEDs from my PCB and opted for four dedicated LEDs instead.


I want to add support for multiple layouts. But then I'll get holes overlapping pads (as well as overlapping holes) like in the picture. Can someone recommend a manufacturer who will produce it that way?
I asked support at JLCPCB (the people behind EasyEDA) and they told me that they can't produce it (although I'm not 100% sure that my question was understood correctly).
(https://i.imgur.com/9IoaDb0.png)
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Thu, 10 January 2019, 14:44:49
It's probaby going to depend on their process and tooling, if they are willing to do it at all or at the price point. I think you'd generally not want to overlap holes by too much when drilling. A bottom cutting end mill may be able to do more awkward cuts, but be more expansive and not doing it as fast as a drill bit. You want to have enough wall for the bit not to snap into the previous hole and break.

I've had this made https://geekhack.org/index.php?topic=67713 with overlapping holes just like your design.

Another option is to actually make the overlapping holes into a single slot, which will be milled instead. Like on the phantom https://deskthority.net/w/images/3/3e/Phantom_PCB-Small.jpg

The manufacturer may also be reluctant milling into copper pads, especially plated through holes. It can tear the copper and cause shorts, and they may still do it at your risk.

3+++) There are different (probably more than you can count) LED drivers that will drive any number of LEDs you'd ask for through any serial interface you'd ask for (probably). They can often do constant current delivery to simplify your BOM, and life in general.
Title: Re: The Living PCB Design Thread
Post by: kuerb on Fri, 08 February 2019, 02:29:35
I ended up ordering at JLC and have received a board with overlapping holes/pads without any extra fees.

Unfortunately the USB connector doesn't fit. I guess I should have created a smaller test PCB with a single key to test all the components and software first, but well, at least I'm learning. Everything else was soldered and running a simple program to blink one of the LEDs (uploaded via ISP) so I've tried soldering a cable directly to the USB lines but can't get the chip to be recognised.

My guess was that this had something to do with the resonator so after trying different fuses (mainly switching CKSEL and CKDIV8) and uploading the dfu-bootloader again and again I still have no idea how to fix this. So I resoldered the resonator and ended up frying my 32u4. I guess I'm going to make that test PCB after all :D.

I know this isn't directly "PCB Design" but what are the correct steps in order to get USB working out of a blank 32u4?
Is it just supposed to work out of box (the datasheet mentions USB will work with the internal resonator when powered >3.4V)?
Do I have to disable CKDIV8 (as it would give me 8 MHz/8 = 1 MHz, which is lower than the 1.5 MHz in Low Speed USB) or does that not matter for the communication part?



Title: Re: The Living PCB Design Thread
Post by: bpiphany on Fri, 15 February 2019, 13:51:47
If you didn't get the 32U4RC it should pop up as a USB device, _if_ you have a 16MHz crystal hooked up the correct way. And use a crystal. Also this is only true as long as you didn't already erase the bootloader with your ISP programmer.

Changing fuses you can set the chip to run from the internal oscillator, without any need of an external clock signal. It's not guaranteed to work out of the box though. It may be a good way to reach the blinky level with a minimum number of parameters.

Here's the app note on using USB with the built in resonator
https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=2ahUKEwjIvazFwL7gAhWgwMQBHfwLBtIQFjAAegQIChAC&url=http%3A%2F%2Fww1.microchip.com%2Fdownloads%2Fen%2FAppNotes%2Fdoc8384.pdf&usg=AOvVaw1nqlVSHuKhP1LCT5U4thL6
Title: Re: The Living PCB Design Thread
Post by: rickylago2 on Wed, 20 February 2019, 15:42:16
I've just stumbled on this thread via google search, and I've got to say reading through it has been massively helpful. Lots of good information here!

I'd like to get some verification from anyone who might be more knowlegable than myself. I've got a lot of experience in hardware modification, but as far as designing my own goes, this is basically my first project. My main goal here is to make a 25 key macro keyboard with an analog joystick on the thumb and per-key RGB lighting using APA102-2020 mounted under RGB cherry switches all connected via Type-C. I've pieced together information from about a million sources online, and I think (or hope  :p) I've set everything up correctly in my schematic. A few specific questions I have about my design so far though:

1) Am I correct in assuming that to use analog signal with the AT90USB1286 I need to have a capacitor on both the AVCC and AREF pins? The datasheet seems to have said this, I mainly just want to make sure I understood it correctly.
2) I know that power over USB can be a concern with the addressable LED like I've chosen. It looks like each runs at 20mA at full brightness, which would max out the 500mA available over USB. If I simply run them at half brightness or so, would this cause power issues still?
3) I've set up my decoupling separate from the chip, similarly to how it is done in the github tutorial that a lot of people reference. I've seen this done a few different ways in this thread and other projects. Should I be setting this up differently to make things easier?
4) In my Type-C wiring, I've connected the CC1 and CC2 pins via 5.1k resistor to ground. I've seen it done this way and with both pins having their own resistors. Is how I currently have it set up sufficient? [attachimg=1]

Thanks in advance for any help. like I said, I have some experience physically modifying existing things, and I have plenty of CAD experience, but PCB design is still pretty fresh to me.
Title: Re: The Living PCB Design Thread
Post by: No_joke on Sat, 30 March 2019, 11:20:48
Hey everyone!

Would love to get some critique on a new (actually, the first) design I'm working on.
It's meant to be a small, two octave digital synthesizer, based on mechanical switches and a Teensy 3.2 with the audio shield.

The connectors labeled as "controls" will be hooked up to linear potentiometers, and those labeled as "LED" to ws2812b LED strips.
On the right of the board you can see a micro USB connector and an audio jack (both connected via cable to the Teensy/audio shield respectively).

Are there any problems with the design?
Do you have any tips/ideas for improvements (both logical and visual)?
Are the via sizes (1mm), trace widths (0.4mm), and clearances (0.2mm) suitable for manufacturing?

[attachimg=1]

The KiCad project is available here https://github.com/m4ntis/teensynth-pcb (https://github.com/m4ntis/teensynth-pcb).

Thanks! :)
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 10 April 2019, 15:35:55
Hey everyone!

I can't help to think you should be able to get away with wiring the matrix directly to the Teensy, and do away with the IO-expander. It looks like you have plenty of pins free. You could do some simpler multiplexing for the matrix as well. If you want to keep the 15 column layout you could use a 4-16 decoder to activate one at a time, and 2 inputs to the Teensy for the rows. That's only 6 pins, and no serial protocol.

It looks like you will be connecting the Teensy with a short USB cable soldered to J5. Is J8 on the bottom of the board? I think it's probably going to collide with the USB connector going into the Teensy otherwise.

Your diode footprint looks wrong. I guess it is possible to put an axial part in a vertical position, but there's no reason not to spread out to a 0.4" pitch.

In general with low speed stuff, if it passes the DRC it's going to be fine.

Edit: Perhaps pull-ups on the data channels to the IO-expander? I'm not familiar with using them, but I understand they are sometimes needed, or handy for even more pull-up even if there already are resistors on the Teensy itself.

And the obvious unconnected pins on the expander and multiplexer of course... But the DRC should catch that.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Wed, 10 April 2019, 15:48:57
I've just stumbled on this thread via google search, and I've got to say reading through it has been massively helpful. Lots of good information here!

1. I think you need to read up on how the analog stuff works. I've never used the ADC functionality myself, but you still need to supply AVCC with power, just more decoupled than VCC in general. Also AREF needs to be connected to some reference for the analog signal in some way, decoupled with a capacitor (at least) probably.
3. The schematic doesn't really care where you put them. What's important is where you put them in the actual layout. Close to the supply pins (very low impedance) and solidly (low impedance) connected to your power source.

Edit: Apparently (reading the datasheet) you can use wither AVCC or an internal 2.56V reference as Aref, and then use only an external capacitor to GND like in your schematic to make it more noise immune. Or you can use an external reference (also decoupled to GND). But AVCC should always be at VCC+-0.3V maximum.
Title: Re: The Living PCB Design Thread
Post by: tedfs3 on Sun, 14 April 2019, 17:49:29
I'm in the same boat as No_Joke and could use some help looking at a design. I honestly have no idea what I'm doing and just learning along the way.
Based off of the Fullsize Custom PCB FIlco Compatible - SaikouType 110 (NKBM-ST110r2) by null but a left handed version. Messed around with Freeroute a bit but
honestly just need some input as to whether the design is correct. Still some aspects I don't understand, like the USB implementation, as there is one connection
with no net. It has a schematic symbol but no footprint.

[attach=1]

Hope the Github thing was done correctly.
https://github.com/Tedfs3/104LH_v3.3 (https://github.com/Tedfs3/104LH_v3.3)
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Sat, 27 April 2019, 19:26:40
DELETED
Title: Re: The Living PCB Design Thread
Post by: HeroXLazer on Mon, 29 April 2019, 21:55:08
Do AVCC, AVCC, and AREF need caps as they're for the A/D C?
Title: Re: The Living PCB Design Thread
Post by: mythosmann on Sun, 05 May 2019, 20:55:08
Howdy all, I've heard this is a good place to go with questions about a pcb.  I've made a few keyboard pcbs before, but it's my first time using onboard components.
I've been working on a pcb replacement for AEK and AEK II keyboards which features a built-in usb hub, rotary encoder support, mx/alps support, and a few other things.  This is what I got so far, I'm guessing it wouldn't work in its current state. You can also find the files on github (https://github.com/MythosMann/aek-pcb).
[attach=1]
[attach=2]
[attach=3]
I'm pretty new to this, and I have a feeling I'm missing a bunch of important stuff.  Any feedback is greatly appreciated.
Title: Re: The Living PCB Design Thread
Post by: Blitzschnitzel on Tue, 07 May 2019, 18:15:14
Well, I would be careful with putting LED on HWB in series with the original pull down resistor. Forward voltage of LEDs is typically more than 0.9V. It is not a big deal though since LEDs conduct some current even below the forward voltage. But if you are unlucky and some interference kicks in then you may not enter the bootloader when you wanted to. If that happens then you would just press the reset button again and again untill the bootloader is entered. You should eventually get there.

After the MCU boots, there is no problem using HWB pin for GPIO (whether input or output ... it does not really matter). The rest of the circuit just cannot mind the pull down resistor there. Most of the time it does not matter. It only increases the power consumption a tiny bit. I used HWB as GPIO myself. It works without any problems (if the rest of the circuit does not mind the pull down there).

E.g. if your keyboard matrix scanning works with pull downs and shortening through switches to the Vcc (instead of to GND as it is common) then you can perfectly use HWB pin as one of the keyboard matrix scanning pins. You would need the pull down there anyway. This is one of the cases when HWB use does not even increase the power consumption.
In other cases, when the ideal circuit does not use pull up nor pull down then you often can add a pull down. In such a case it only increases the power consumption a bit. If the rest of the circuit requires a pull up there then you course you cannot use HWB pin (and keep the boot loader on reset feature).
Hi Guys,
I am exactly one pin short. would something like this work?
[attach=1]
Also, I was wondering if I could use a larger capacitor to put a bit of a delay on the reset pin, so that I can use the same switch to pull down reset and HWB? Or are there some kind of delay transistors, so that I don't get over the max capacitance?
Do you know of some opensource boards which use the HWB pin so that I can take a look at how they do it?
Title: Re: The Living PCB Design Thread
Post by: ErgoMacros on Tue, 07 May 2019, 18:46:41
Quote
I've been working on a pcb replacement for AEK and AEK II keyboards...

Looks like you have a COL21 on the MCU that's not used in the matrix. No harm done.
All the best.
Title: Pffff, Syke—
Post by: Villa on Thu, 09 May 2019, 20:53:47
Hello. I'm trying to dip my foot into KiCad and keyboard PCB design, but all of the tutorials recommended from these parts are old, outdated, and inapplicable to the current version of KiCad.

I would like to know if anyone can recommend some resources to make this possible.

Thanks for the time.


Got lucky, figured it out.

As I always do...
Title: Re: The Living PCB Design Thread
Post by: ErgoMacros on Thu, 09 May 2019, 21:53:56
@Blitzschnitzel, re: needing an extra pin... I don't know what the rest of your pins are doing, so maybe these don't apply, but here goes.

1. I came across this while back...
   https://www.edn.com/design/systems-design/4433477/3-pins--3-LEDs--3-buttons (https://www.edn.com/design/systems-design/4433477/3-pins--3-LEDs--3-buttons)
Maybe of some use depending on what you other pins are being used for.

2. Also, if you needed 2 switches you can do that with a ADC pin and a couple resistors.
   https://www.edn.com/design/analog/4439796/Read-multiple-switches-using-ADC (https://www.edn.com/design/analog/4439796/Read-multiple-switches-using-ADC)

3. Another of my favorite HW pages, many ways to read switches. Might be some inspiration...
   http://www.openmusiclabs.com/learning/digital/input-matrix-scanning/index.html (http://www.openmusiclabs.com/learning/digital/input-matrix-scanning/index.html)

Luck!
Title: Re: The Living PCB Design Thread
Post by: Amy Worrall on Tue, 04 June 2019, 14:56:26
(https://www.dropbox.com/s/0e406qdkz979zaj/IMG_0697.jpeg?raw=1)

The first PCB I ever designed! It's for a theatre lighting control keyboard.

It's iteration 1 of (probably) many. Currently this PCB only contains the keyboard matrix — the rows and the columns end in headers that I'll connect to my Teensy using wires. I have more ambitions, including RGB LEDs, but those will have to wait for future boards. I realised that I was biting off more than I could chew trying to do all the things on my v1, so I wanted to get something that worked first!
Title: Re: The Living PCB Design Thread
Post by: Villa on Thu, 06 June 2019, 06:57:07
Show Image
(https://www.dropbox.com/s/0e406qdkz979zaj/IMG_0697.jpeg?raw=1)


The first PCB I ever designed! It's for a theatre lighting control keyboard.

It's iteration 1 of (probably) many. Currently this PCB only contains the keyboard matrix — the rows and the columns end in headers that I'll connect to my Teensy using wires. I have more ambitions, including RGB LEDs, but those will have to wait for future boards. I realised that I was biting off more than I could chew trying to do all the things on my v1, so I wanted to get something that worked first!

Would that fit into a console of some kind? A compartment/case?

Also quite interested to know what kind of work you do, Amy.
Title: Re: The Living PCB Design Thread
Post by: Amy Worrall on Thu, 06 June 2019, 09:23:18

Would that fit into a console of some kind? A compartment/case?

Also quite interested to know what kind of work you do, Amy.

I have an enclosure that looks like this. It'll hold the keyboard-y bit, plus a tiny computer and some DMX output hardware, a couple of small LCD displays, etc.

(https://www.dropbox.com/s/7g9vdcv7yk5kr9w/1456WL1BKBU.jpg?raw=1)

As for work, for my day job I work for Facebook as a software engineer. This is a side project/hobby :)
Title: Re: The Living PCB Design Thread
Post by: Villa on Mon, 10 June 2019, 14:38:25

Would that fit into a console of some kind? A compartment/case?

Also quite interested to know what kind of work you do, Amy.

I have an enclosure that looks like this. It'll hold the keyboard-y bit, plus a tiny computer and some DMX output hardware, a couple of small LCD displays, etc.

Show Image
(https://www.dropbox.com/s/7g9vdcv7yk5kr9w/1456WL1BKBU.jpg?raw=1)


As for work, for my day job I work for Facebook as a software engineer. This is a side project/hobby :)

Cool biz—
Title: Re: The Living PCB Design Thread
Post by: pabile on Tue, 05 November 2019, 05:49:14
hello gh,

i've been reading and trying to learn for some time now and wanted to seek for your feedback on this pcb i did before i send it to shop/maker. this is my first and i am not sure if i did things correctly. same as my source, contra, i'll be using pro micro as its controller.

Title: Re: The Living PCB Design Thread
Post by: psyduck200 on Mon, 18 November 2019, 23:32:03
hi all, how do you guys decide which micro controller to use in your custom keyboard?
Title: Re: The Living PCB Design Thread
Post by: Applet on Tue, 19 November 2019, 05:59:18
hi all, how do you guys decide which micro controller to use in your custom keyboard?
I choose one that already has QMK support and has the number of pins needed for the keyboard matrix and periferals (rgb leds or such).

https://beta.docs.qmk.fm/hardware/compatible_microcontrollers

The AVR-processors are generally prefered and recommended (ATmega32u2 / ATmega32u4 or AT90USB64 / AT90USB128)
Title: Re: The Living PCB Design Thread
Post by: gipetto on Tue, 19 November 2019, 08:12:51
I'm in the same boat as No_Joke and could use some help looking at a design. I honestly have no idea what I'm doing and just learning along the way.
Based off of the Fullsize Custom PCB FIlco Compatible - SaikouType 110 (NKBM-ST110r2) by null but a left handed version. Messed around with Freeroute a bit but
honestly just need some input as to whether the design is correct. Still some aspects I don't understand, like the USB implementation, as there is one connection
with no net. It has a schematic symbol but no footprint.

Hope the Github thing was done correctly.
https://github.com/Tedfs3/104LH_v3.3 (https://github.com/Tedfs3/104LH_v3.3)

I liked your design so I cloned the layout while modifying it for iso, adding macro switches and a backlight. it's a primitive circuit, lacking a led mosfet, and the clever usb port that you have but I wanted something cheap and reliable. I welded the tray case from mild steel in the style of the duck keyboards. It's almost finished, but some parts have disappeared in the post, so it may drag on for months.
https://github.com/itsnoteasy/misc/tree/master/left_110key
Title: Re: The Living PCB Design Thread
Post by: sypl on Fri, 29 November 2019, 21:13:41
Hi PCB experts. I was hoping one of you could help me verify a schematic. My goal is to update ruiqimao's PCB guide (https://github.com/ruiqimao/keyboard-pcb-guide/) to use a more modern ARM chip. I know a lot of keyboard PCBs nowadays are using them, so I thought it would be good to have a go at making one with the STM32F103 chip.

The aim is the same as the original guide, to make a minimal four key keyboard. To that end I've posted what I think is the right schematic, but before I lay out the PCB and get it sent to fab I wonder if anyone could give it a look and tell me whether I'm on the right path or not.

The proposed schematic is here: https://github.com/ruiqimao/keyboard-pcb-guide/issues/17#issuecomment-558419724

Many thanks in advance!
Title: Re: The Living PCB Design Thread
Post by: ErgoMacros on Sat, 30 November 2019, 11:15:42
Thanks for working on this!  :D
Title: Re: The Living PCB Design Thread
Post by: jstein91 on Thu, 05 December 2019, 13:44:49
Hello all!

Im working on a custom PCB and could use some help.

I know its best practice to route USB D lines without vias and deferentially. The issue Im running into is how to actually do that.

Here is how I have it now:

[attachimg=1]

As you can see I have the traces the same length BUT I had to use vias so the lines dont cross. Ive tried the component on both side of the board and for the lines to not cross it has to be on the top which means I need vias.

Whats the best way to handle this? Should I move the USB to the top also? Then I think I would still need vias to get the trace to the bottom where it can go into the MCU. Am I missing something here? All advise is appreciated.
Title: Re: The Living PCB Design Thread
Post by: gipetto on Thu, 05 December 2019, 14:29:38
why not do this? tbh, if it was me i'd keep the usb lines straight, and put the port on the left hand side. those crystal lines seem quite long, you could rotate the mcu 90 degrees anticlockwise and have the crystal up top.
Title: Re: The Living PCB Design Thread
Post by: jstein91 on Fri, 06 December 2019, 08:31:48
why not do this? tbh, if it was me i'd keep the usb lines straight, and put the port on the left hand side. those crystal lines seem quite long, you could rotate the mcu 90 degrees anticlockwise and have the crystal up top.

Wow! I dont think it ever would have occurred to me to route it that way! Thats great. Thanks.

RE the crystal lines, Im going to take your advice and rotate. I need to redo the switch matrix anyway so I might as well and it looks like that would also make it eaiser to route the data lines.
Title: Re: The Living PCB Design Thread
Post by: theNestruo on Sat, 18 January 2020, 12:22:50
Hi!

Newbie here wanting to do his first keyboard (a EM7/Alice-based ISO TKL).

I know very little about electronics; so I was blindly following Ruiqi Mao's guide (https://github.com/ruiqimao/keyboard-pcb-guide) first, and ai03's guide (https://wiki.ai03.me/books/pcb-design/chapter/pcb-designer-guide) then. At the same time, I was trying to apply every tip I've read in this thread, and trying to learn something peeking other opensource PCBs (Gondolindrim ones (https://github.com/Gondolindrim), mainly).

Currently, I think the PCB is mostly right (at least it seems right to me!), but I'm quite confused about some things:
Can someone enlighten me?

I'm attaching the schematics (PDF) and PCB (gerber); if someone can have a look at them and point mistakes/advices that would be really helpful and appreciated!

Thanks in advance!
Title: Re: The Living PCB Design Thread
Post by: gipetto on Sat, 18 January 2020, 13:40:18
Generally the more capacitors you use the better. They aren't critical and the mcu will usually work without them, they're just insurance against things going wrong. I don't know the real answer, just copy a good quality datasheet and it should work.

all pins are safe to use. mosi etc are for isp programming which requires them to be isolated. This isn't an issue in keyboard matrixes because each unpressed switch on a row or column isolates the connection, and the programming speed is slow enough that capacitance is not an issue either, like it could be on a usb bus. So just run each isp pin to a header, doesn't even have to be the 2x3 header atmel recommends as you will probably be just fine with the default bootloader and never use it.

I think some pcbs route the vcc under the mcu to make routing easier. it will work, but not best practice as there's some rf magic lore that says mcus should have a ground plane underneath, with a load of vias to wick the heat away to the other side of the pcb.

i'm new to crystal grounds myself but atmegas usually work anyway. apparently you're supposed to exclude the ground plane from underneath the crystal to avoid creating capacitance, or conducting rf into other parts of the pcb. maybe that is why the designs you've seen have the ground plane isolated there. anyway, try an exclusion zone instead, they're easy to do.

segment errors tend to result from a broken line. I bet if you use a different usb footprint you will avoid that error.

your pcb looks to be of excellent quality and well laid out. all i would do is add an isp header but it's not needed either as you can just solder straight to the switch contacts.
Title: Re: The Living PCB Design Thread
Post by: theNestruo on Sun, 19 January 2020, 07:20:47
Hi!

Generally the more capacitors you use the better.
I've added "the missing" capacitor.

all pins are safe to use. mosi etc are for isp programming which requires them to be isolated. This isn't an issue in keyboard matrixes because each unpressed switch on a row or column isolates the connection, and the programming speed is slow enough that capacitance is not an issue either, like it could be on a usb bus. So just run each isp pin to a header, doesn't even have to be the 2x3 header atmel recommends as you will probably be just fine with the default bootloader and never use it.
I've added the header; may remove it later if it complicates the manufacturing of the board* (or use regular vias instead).

I think some pcbs route the vcc under the mcu to make routing easier. it will work, but not best practice as there's some rf magic lore that says mcus should have a ground plane underneath, with a load of vias to wick the heat away to the other side of the pcb.
I had a +5V zone below (after the 10uF capacitor) to power all the +5V pins (through their +5V/GND capacitors)... I've replaced it with a trace, set the zone to be GND, and gruyèred the area.

segment errors tend to result from a broken line. I bet if you use a different usb footprint you will avoid that error.
As you said, I used a different USB footprint and the error dissapeared!

your pcb looks to be of excellent quality and well laid out. all i would do is add an isp header but it's not needed either as you can just solder straight to the switch contacts.
Woah! Thanks!!! I wasn't expecting that! :-O

I've also moved the atmega a little bit and used different pins (to avoid using the ones closer to the crystal), plus a few tweaks in the groups of traces... and it looks a little cleaner :)

Thank you so much for your feedback!!!

Here it is:
[attach=3]

* I have no solder equiment nor the knowledge/ability to do it... My idea was to use JLCPCB SMT assembly service (or a similar page; haven't checked prices, pieces availability, etc. yet).
Title: Re: The Living PCB Design Thread
Post by: theNestruo on Thu, 23 January 2020, 13:57:19
Hello, again!

I've been playing around a little with the JLCPCB SMT Parts Library... and found no USB connectors :(

Meanwhile, I found this kind of connectors that looks cheap, "easy" to solder, and have fewer pins that a Teensy or a Pro Micro (less pins to solder):
[attach=1]

Maybe that's the way to go (for me)! Can I keep both footprints in the PCB (as pictured)? Or will that mess up the D+/D- lines?
[attach=2]

Thanks again!!
Title: Re: The Living PCB Design Thread
Post by: gipetto on Thu, 23 January 2020, 14:10:06
it will work fine. layout is not all that critical. In the past I have converted micro usb designs to mini usb, which are available in through hole. There's also the huge usb-B port common on printers and the rarer usb-C through hole part used on the discipline.
Title: Re: The Living PCB Design Thread
Post by: theNestruo on Mon, 27 January 2020, 10:50:02
Hi (again)! And thank you very much for your feedback, gipetto :)

It seems that JLCPCB has no stock of the ATMEGA32U4... so I've tried to use ATMEGA32U2 instead. The problem is all the guides I've been following use an U4 and, as I have very little knowledge of electronics, reading the U2 datasheets didn't help.
I've removed a capacitor (the U2 has one less VCC pin than the U4)... but I really don't know what I'm doing.

Does anyone has an schematic of a simple keyboard using the U2? Namely: values (for capacitors and resistances), crystal, should I still connect a resistance to the HWB pin? Does the RESET pin requires a resistance? Etc.

Or would it be better to wait for JLCPCB to re-stock the U4?

Thanks!
Title: Re: The Living PCB Design Thread
Post by: gipetto on Mon, 27 January 2020, 11:47:11
I'd wait for a week or so until the holidays are over for the 32u4, though I understand they have been extended due to corona virus. not sure how that will affect you. a week is nothing with mail order products. i've had packages disappear and turn up 3 months later. it's a common problem to get stuck on an issue and have a project stall as a result so i'm reluctant to do changes myself. if i had experience with other mcus i might have a different opinion.
Title: Re: The Living PCB Design Thread
Post by: theNestruo on Mon, 27 January 2020, 13:13:41
I can wait :) I'm doing this for fun and learning purposes with a friend... and I'm definitely more comfortable following the atmega32u4-oriented tutorials/guides. Thanks, gipetto!
Title: Re: The Living PCB Design Thread
Post by: Applet on Tue, 28 January 2020, 00:49:19
Hi (again)! And thank you very much for your feedback, gipetto :)

It seems that JLCPCB has no stock of the ATMEGA32U4... so I've tried to use ATMEGA32U2 instead. The problem is all the guides I've been following use an U4 and, as I have very little knowledge of electronics, reading the U2 datasheets didn't help.
I've removed a capacitor (the U2 has one less VCC pin than the U4)... but I really don't know what I'm doing.

Does anyone has an schematic of a simple keyboard using the U2? Namely: values (for capacitors and resistances), crystal, should I still connect a resistance to the HWB pin? Does the RESET pin requires a resistance? Etc.

Or would it be better to wait for JLCPCB to re-stock the U4?

Thanks!
Check alps64 by hasu. I like the atmega32u2.
Title: Re: The Living PCB Design Thread
Post by: Old_Gold_Hand on Fri, 21 February 2020, 13:28:03
I made a simple pcb as a project to work with qmk and rotary encoders. The pcb uses an ATMEGA32u4-AU MCU. I modeled the schematic after the pro micro, and followed ruqimao's tutorial. I have the ability to prototype pcbs fairly quickly, so I can make a new version easily.

When I plug the usb into the computer, I get the error Device Not Found.

Things I have tried:
Grounding HWB pin
Pulling down HWB with 10kresistor
not connecting HWB pin

I have poured many many hours into this project and am losing my mind. When I plug a pro micro in, it shows up as an atmega32u4.

Any help would be greatly appreciated

[attachimg=1]
Title: Re: The Living PCB Design Thread
Post by: gipetto on Fri, 21 February 2020, 17:09:38
does the mcu come with a bootloader?(usually do) remember you can't flash them like a dev board, you need to use the appropriate software for atmel-flip.

dfu-programmer atmega32u4 erase --force
dfu-programmer atmega32u4 flash <file.hex>
Title: Re: The Living PCB Design Thread
Post by: Old_Gold_Hand on Sat, 22 February 2020, 08:15:26
I believe this model does, the ATMEGA32u4 model with the external crystal comes with a bootloader. I downloaded atmel flip, I guess I will play with that as well. Can I do this over USB or do I need to do this over ISP in a socket? feels like I should be able to do it over usb.

Really grateful for your response, Im ready to try anything.
Title: Re: The Living PCB Design Thread
Post by: gipetto on Sat, 22 February 2020, 11:01:41
it should upload fine over usb. isp is really only a last resort, or for a device which doesn't use usb.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 24 February 2020, 02:16:50
I believe you have uCap wired up incorrectly. For a "bus powered device" it should connect only to GND through a 1µF capacitor.

section 21.3.1
http://ww1.microchip.com/downloads/en/devicedoc/atmel-7766-8-bit-avr-atmega16u4-32u4_datasheet.pdf
Title: Re: The Living PCB Design Thread
Post by: Old_Gold_Hand on Wed, 26 February 2020, 19:32:41
Thanks all for chiming in. Going to tinker with this on the weekend, gonna have to jump a pin through a cap to try it. Will report back
Title: Re: The Living PCB Design Thread
Post by: Zustiur on Sat, 21 March 2020, 02:02:16
I'm stuck with my current build. I've managed to program blinky using the ISP pins and AVRDude, and it functions so long as the ISP Programmer is plugged in. When I disconnect that and instead connect the board via USB, nothing happens. No blinking light, no detection noise from Windows.
I've used a multimeter to prove there's a connection between the pins on the USB header and the pins on the ATMega32U4.
At this point I'm stumped and would appreciate any suggestions on how to troubleshoot this further!
Title: Re: The Living PCB Design Thread
Post by: gipetto on Sat, 21 March 2020, 05:58:24
Need a schematic picture, could have left out termination resistors, or screwed up the usb-c implementation. lots of things that could have went wrong.
Title: Re: The Living PCB Design Thread
Post by: Zustiur on Sat, 21 March 2020, 09:38:22
Right, the schematic. That would definitely help.  :))
It's overly complicated because I built it with the expectation of having issues like this. Ordered from JLCPCB, so I got 5 copies. I therefore decided to have an option for Teensy or directly wired ATMega32U4. Hence the jumpers to separate the ATMega from the switches. The idea being that I'd prove the layout worked with the teensy then spend as much time as I needed to figure out ISP programming. Turns out I've been unable to desolder my teensy from a previous prototype and ISP programming was a snap.
I'll experiment with USB programming once I actually get USB to function.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 23 March 2020, 05:58:24
And you haven't erased the bootloader when doing ISP programming? I don't remember what linux says about a atmega without anything USB on it. And I have no idea how Windows reacts to it.
Title: Re: The Living PCB Design Thread
Post by: Zustiur on Mon, 23 March 2020, 06:24:36
Not that I'm aware of no. All I did was run a command to write the hex file onto the chip.
avrdude -c usbtiny -p m32u4 -U flash:w:zusdox2.hex:i

The board I haven't flashed yet doesn't respond to USB either. Any idea what should happen detection-wise with a baseline atmega32u4-au chip? I expected it to at least show up as an unrecognized device but as I said, no indication what-so-ever that Windows detected the connection.

Could it be something to do with the fuse bits? Maybe I need to enable USB somehow? I can't see anything about that in the datasheet, but I have a very hard time understanding the datasheet, so I may have missed something important.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 23 March 2020, 06:43:58
The AU chips should come with bootloader, and running with crystal oscillator input as default. I think you should have the correct fuse bits unless you changed them.

It does however sound like you have something going on with the power. You get power through the ISP programmer, but not over USB. If you have a blinky program it should run when you connect USB power as well.

You probably erased the bootloader when ISP programming though. I don't think you can program the chip without erasing it.
Title: Re: The Living PCB Design Thread
Post by: Zustiur on Mon, 23 March 2020, 07:38:09
Did my schematic look ok at least? (last post page 17)

I just though to compare some readings with a teensy. I don't really know what I'm looking for, but the results could be a clue. I'm using the Diode/continuity testing option on my multimeter.
On the Teensy: Pins 1 & 5 show 457. On my board, pins 1 &5 show 641
Or in other words, when one probe is on GND and the other is on VBUS I get different readings between Teensy and my board. Whether that's meaningful or not... I don't know.


Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 23 March 2020, 08:10:04
If you have a very simple blinky program, that doesn't try to initiate any USB things or something at start-up, it should just kick off when you supply 5V on the rail. If it doesn't I would suspect you are not getting power from USB. What do you get if you measure VCC-GND with USB plugged in?
Title: Re: The Living PCB Design Thread
Post by: gipetto on Mon, 23 March 2020, 09:55:05
vbus is missing a 10uf decoupling cap and from what i can see you have only one one mcu pin wired up. check out other keyboard schematics, uvcc, avcc, vcc should all be connected to the usb port
Title: Re: The Living PCB Design Thread
Post by: Zustiur on Mon, 23 March 2020, 18:43:11
vbus is missing a 10uf decoupling cap and from what i can see you have only one one mcu pin wired up. check out other keyboard schematics, uvcc, avcc, vcc should all be connected to the usb port

I've been very puzzled about that 10uf decoupling cap. I thought from what I read, 10uf was the maximum total you can use, not the recommendation for a single capacitor. It's all very confusing.
All of my uvcc avcc vcc pins are connected to the VCC in the schematic. They all connect to each other one way or another and therefore ... Wait, I just checked my schematic vs the ones I was referencing. I think I see the problem you're talking about now. I'll see what I can do to resolve it with hook up wires.


==Edit==
BINGO.
Connecting Pin 1 of USB to a point on my VCC line makes the light blink. I should be able to resolve it from here!

I'd still appreciate a clear answer on the 10uf cap issue though. Is it necessary? Recommended? Max of 10uf? 10uf cap specifically needed on that line? I'm very lost on that particular issue.
Title: Re: The Living PCB Design Thread
Post by: gipetto on Mon, 23 March 2020, 19:06:08
I don't understand capacitor sizing tbh, like many I copy reference designs. generally in most electronics there's one big smoothing capacitor which works as a primitive voltage regulator. Usb has a limit on capacitance so that's why you won't see much larger values. Then there's a small decoupling capacitor for each pin, to keep ac away from sensitive circuits.
Title: Re: The Living PCB Design Thread
Post by: kelvinhall05 on Mon, 23 March 2020, 19:26:56
Hi guys, I spent a few hours today learning KiCAD and making a schematic and then a PCB. I've ran a DRC and everything appears to be fine, and I've checked in the 3D viewer and it looks great. I uploaded to JLCPCB and it also looks fine there, but I would love if someone who knows what they're doing could check it for me before I buy some PCBs and find out I forgot something important lol. Additionally, I would love some help making the edge cut/border, as I can't figure out how to do rounded corners and am not certain if I did it right.

tl;dr: Can I have help with edge cuts, and is my PCB otherwise ready to be sent to JLC? Thanks!

Link with gerber file zip and KiCAD_PCB file, hopefully this is enough:

https://drive.google.com/file/d/15saIauaqHZDdibvOiQnLP2Bm9QKa6A7r/view?usp=sharing

https://drive.google.com/file/d/14sWQL_ujHY77a7lsjta9pp-V5MFkGECz/view?usp=sharing
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Tue, 24 March 2020, 02:41:16
I'd still appreciate a clear answer on the 10uf cap issue though. Is it necessary? Recommended? Max of 10uf? 10uf cap specifically needed on that line? I'm very lost on that particular issue.

There is some specification saying you are only guaranteed to be able to have 10µF without inrush current limiting on USB. It's probably going to be ok if it is slightly more. But if you use 4.7µF like in that schematic and then a bunch of 1µF and 100nF caps all around for all sorts of reasons you are probably going to have enough decoupling anyway. Depending on the type of loads you circuit needs to handle in other ways. For the microcontroller it is surely going to be suffieicent.
Title: Re: The Living PCB Design Thread
Post by: gipetto on Tue, 24 March 2020, 06:29:48
Hi guys, I spent a few hours today learning KiCAD and making a schematic and then a PCB. I've ran a DRC and everything appears to be fine, and I've checked in the 3D viewer and it looks great. I uploaded to JLCPCB and it also looks fine there, but I would love if someone who knows what they're doing could check it for me before I buy some PCBs and find out I forgot something important lol. Additionally, I would love some help making the edge cut/border, as I can't figure out how to do rounded corners and am not certain if I did it right.

tl;dr: Can I have help with edge cuts, and is my PCB otherwise ready to be sent to JLC? Thanks!

Link with gerber file zip and KiCAD_PCB file, hopefully this is enough:

https://drive.google.com/file/d/15saIauaqHZDdibvOiQnLP2Bm9QKa6A7r/view?usp=sharing

https://drive.google.com/file/d/14sWQL_ujHY77a7lsjta9pp-V5MFkGECz/view?usp=sharing

from what i can see only half your switch contacts are routed. I'm not familiar with alps and I don't know what is your strategy for stabilizers.
Title: Re: The Living PCB Design Thread
Post by: Zustiur on Tue, 24 March 2020, 07:26:26
I had a look too kelvinhall, I agree with gipetto. It looks like you've only connected your rows, haven't connected any columns and haven't connected any of your switches to your diodes. When I run DRC on your PCB, yes it shows 0 'Problems' but on the other tab it shows 60 Unconnected Items. Turning on the Ratsnest makes this really obvious.
Your edge cuts are fine if you want sharp corners. If you want curved corners, you have to use the 'Add graphic arc' tool when you have the Edge Cuts layer selected. For a simple rectangular board like yours, you'd need 4 straight lines and 4 90 dregree arcs. Each line segment is a separate 'object' and can be manipulated individually. You may have been tricked by the way 'Add graphic line' seems to draw connected lines.


Thanks bpiphany, that's more or less what I thought with the 10uf capacitor 'limit'. My board is appearing in USB and responding now. Currently I'm trying to figure out where I've gone wrong that's causing only the first 2 rows to function. I think I've probably missed a comma somewhere in TMK, but at least that's in the programming realm where I'm more comfortable. Thanks again to you and gipetto for assisting with the hardware diagnosis.
Title: Re: The Living PCB Design Thread
Post by: kelvinhall05 on Tue, 24 March 2020, 08:27:47
Hi guys, I spent a few hours today learning KiCAD and making a schematic and then a PCB. I've ran a DRC and everything appears to be fine, and I've checked in the 3D viewer and it looks great. I uploaded to JLCPCB and it also looks fine there, but I would love if someone who knows what they're doing could check it for me before I buy some PCBs and find out I forgot something important lol. Additionally, I would love some help making the edge cut/border, as I can't figure out how to do rounded corners and am not certain if I did it right.

tl;dr: Can I have help with edge cuts, and is my PCB otherwise ready to be sent to JLC? Thanks!

Link with gerber file zip and KiCAD_PCB file, hopefully this is enough:

https://drive.google.com/file/d/15saIauaqHZDdibvOiQnLP2Bm9QKa6A7r/view?usp=sharing

https://drive.google.com/file/d/14sWQL_ujHY77a7lsjta9pp-V5MFkGECz/view?usp=sharing

from what i can see only half your switch contacts are routed. I'm not familiar with alps and I don't know what is your strategy for stabilizers.
Alps stabs go on the plate, but I'll check my switches, thanks.
Title: Re: The Living PCB Design Thread
Post by: MechKeys122 on Fri, 01 May 2020, 20:12:10
Edit: Nevermind. I think i figured it out.
Title: Re: The Living PCB Design Thread
Post by: kelvinhall05 on Thu, 14 May 2020, 08:16:18
Hi guys, are there standard sizes for the spacing between keyswitches for keys bigger than 1u?
Title: Re: The Living PCB Design Thread
Post by: jouz on Thu, 14 May 2020, 08:51:18
All switches are in the center of the keycap (except for some legacy things like stepped capslock, 6u spacebars with off-center stem).

You can easily calculate the distance between the centers (i.e. switch stem position) of two adjacent keys:

If you have a 1u next to a 1.25u (u = key units, which is multiples of 19.05mm):

      1u/2       +     1.25u/2
 = (19.05mm*1)/2 + (19.05mm*1.25)/2
 =  21.43125mm.

Title: Re: The Living PCB Design Thread
Post by: kelvinhall05 on Thu, 14 May 2020, 09:21:20
All switches are in the center of the keycap (except for some legacy things like stepped capslock, 6u spacebars with off-center stem).

You can easily calculate the distance between the centers (i.e. switch stem position) of two adjacent keys:

If you have a 1u next to a 1.25u (u = key units, which is multiples of 19.05mm):

      1u/2       +     1.25u/2
 = (19.05mm*1)/2 + (19.05mm*1.25)/2
 =  21.43125mm.


Cool, thanks :D
Title: Re: The Living PCB Design Thread
Post by: Thomas73951 on Sat, 16 May 2020, 04:48:53
Hi, so I made a pcb for a macropad powered by a pro micro and was wondering if anyone would be willing to have a quick look at it and see if there are any issues or even just ways of routing the traces more neatly.

Thanks in advance.

Front of board v
[attach=1]
[attach=5]

Back of board
[attach=2]
[attach=6]

Schematic
[attach=3]

Screenshot of pcb with some layers hidden to make it easier to see the traces.
[attach=4]
Title: Re: The Living PCB Design Thread
Post by: gipetto on Sat, 16 May 2020, 07:31:51
it looks functional but i'd place all the diodes in the same direction to avoid confusion over polarity.
Title: Re: The Living PCB Design Thread
Post by: Thomas73951 on Sun, 17 May 2020, 06:30:51
it looks functional but i'd place all the diodes in the same direction to avoid confusion over polarity.

Like this:
[attach=1]

Front:
[attach=2]

Back:
[attach=3]

If I keep it like this I will sort out the text direction and I might fix the spacing on the row with 5 diodes on. I could maybe make the number of diodes per row consistent but that will need quite a lot of work rerouting all the traces.

Title: Re: The Living PCB Design Thread
Post by: gipetto on Sun, 17 May 2020, 11:12:39
that's fine. there's no real benefit to having one diode per switch, apart from tidiness or diagnosing faults without a pcb file. mostly you're trying to avoid faults in component assembly. you ran traces between two arduino pins in a few places. there is a chance of a solder bridge with that so it would be better if you could reconfigure the pinout to avoid crossing over to the inaccessible header side of the arduino.
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Mon, 18 May 2020, 06:16:04
there's no real benefit to having one diode per switch, apart from tidiness or diagnosing faults without a pcb file.

ghosting?
Title: Re: The Living PCB Design Thread
Post by: Thomas73951 on Mon, 18 May 2020, 11:28:28
that's fine. there's no real benefit to having one diode per switch, apart from tidiness or diagnosing faults without a pcb file. mostly you're trying to avoid faults in component assembly. you ran traces between two arduino pins in a few places. there is a chance of a solder bridge with that so it would be better if you could reconfigure the pinout to avoid crossing over to the inaccessible header side of the arduino.


there's no real benefit to having one diode per switch, apart from tidiness or diagnosing faults without a pcb file.

ghosting?


I thought it was necessary to have one diode per switch for the matrix to work and not have issues like ghosting. I mean I have always called this design of connecting switches in a grid a diode matrix.
If I didn't have one diode per switch, how many would I have, none?

I know that the traces could be neater and I don't fully understand the concept of connecting different sections without using traces. I think I only did it for the reset switch ground. I could change the pinout for the pro micro, but there is already a 5x4 macropad called numpad20 with that pinout and it's here: https://config.qmk.fm/#/handwired/numpad20/LAYOUT (https://config.qmk.fm/#/handwired/numpad20/LAYOUT)
I decided it was easier to keep things consistent and just use that one. There doesn't need to be two 5x4 macropads that are the same except for the pinout.

Also, I think I might move the diodes around again because I don't like how it looks. Furthermore, there is a thicker band on the silkscreen image of the diode pointing towards the square so it shouldn't be too hard to tell which way round the diode goes. I might even modify the footprint to have the diode silkscreen on both sides.
Title: Re: The Living PCB Design Thread
Post by: gipetto on Mon, 18 May 2020, 14:59:50
sorry i meant. to say there's no real benefit to having each switches diode located nearby to the switch.
Title: Re: The Living PCB Design Thread
Post by: Thomas73951 on Tue, 19 May 2020, 03:55:29
sorry i meant. to say there's no real benefit to having each switches diode located nearby to the switch.

Ah ok. I could put 5 diodes per row and arrange them so they look neat. The only issue will be that the traces will be a lot more complicated and probably look messier. I will try that though.
Title: Re: The Living PCB Design Thread
Post by: Thomas73951 on Tue, 19 May 2020, 11:13:15
I have now put all the diodes so that they are 5 per row and evenly spaced, altered the diode numbering system to be by row instead of by column. I also shifted some around to make the traces shorter and less messy.
I think it looks nicer than the original diode layout. Hopefully the traces won't be too much of a mess.

[attach=1]
Title: Re: The Living PCB Design Thread
Post by: Zustiur on Thu, 21 May 2020, 23:52:47
I normally put the sides on the underside of the PCB within the boundary of the switch it's attached to. That keeps things nice and neat. That wouldn't work with through hole diodes though.
Title: Re: The Living PCB Design Thread
Post by: Thomas73951 on Fri, 22 May 2020, 08:21:31
I normally put the sides on the underside of the PCB within the boundary of the switch it's attached to. That keeps things nice and neat. That wouldn't work with through hole diodes though.

I originally put them there, I put all the traces in and it was neat, but I realised it wouldn't fit and had to redo all the traces. How I have it currently, only a basic soldering iron, solder, a screwdriver, and pliers are needed to assemble it. I'm happy to have the hybrid ones that allow for SMD and TH diodes but I'd rather not have to deal with those tiny SMD diodes.



I have finished wiring all the traces. Not as messy as I thought it might be but I think it could be better.
Front:
[attach=1]

Back:
[attach=2]

I'm not sure if the filled zones are important at all. They are set to ground on both sides of the board and the only thing that uses them is the reset switch, which could just have a trace running to it anyway. With where the traces run on the front they create large gaps which don't look great. What should I do with them?
Title: Re: The Living PCB Design Thread
Post by: Fabi on Fri, 22 May 2020, 10:25:31
I normally put the sides on the underside of the PCB within the boundary of the switch it's attached to. That keeps things nice and neat. That wouldn't work with through hole diodes though.

I originally put them there, I put all the traces in and it was neat, but I realised it wouldn't fit and had to redo all the traces. How I have it currently, only a basic soldering iron, solder, a screwdriver, and pliers are needed to assemble it. I'm happy to have the hybrid ones that allow for SMD and TH diodes but I'd rather not have to deal with those tiny SMD diodes.



I have finished wiring all the traces. Not as messy as I thought it might be but I think it could be better.
Front:
(Attachment Link)

Back:
(Attachment Link)

I'm not sure if the filled zones are important at all. They are set to ground on both sides of the board and the only thing that uses them is the reset switch, which could just have a trace running to it anyway. With where the traces run on the front they create large gaps which don't look great. What should I do with them?
For the zones: just place a via in a non filled area, so that front and backside are connected.
Title: Re: The Living PCB Design Thread
Post by: Thomas73951 on Fri, 22 May 2020, 10:46:00
For the zones: just place a via in a non filled area, so that front and backside are connected.

That would solve the problem of unfilled zones, but it doesn't answer the question of their need and whether there is a better use of zones or to not have them at all. Is it a good idea to have 4 zones on the back and have them set to col0, col1, col2, and col3? And then maybe have something similar for the front.
Title: Re: The Living PCB Design Thread
Post by: Fabi on Fri, 22 May 2020, 16:15:16
I am really not an expert on this, but I think you would want a ground plane beneath the MCU and the crystal for shielding reasons?
One reason for planes all over the PCB I can think of is related to etching the PCB. Removing all the copper just wastes to much acid.
If I am wrong, feel free to correct me.
Title: Re: The Living PCB Design Thread
Post by: Thomas73951 on Sun, 24 May 2020, 04:51:49
Hmm ok. I'm fairly new to all of this. I followed this guide https://github.com/ruiqimao/keyboard-pcb-guide (https://github.com/ruiqimao/keyboard-pcb-guide) and it explains the process well, but understandably doesn't go into the more technical aspects like that so I hadn't even thought about that. The guide also showed the process for a one board solution with smd components, whereas I am using a pro micro so it's on a separate board entirely and is attached to the back with the side that has all the components on facing towards the main pcb. So that might cause some issues because of their proximity (around 1 or 2mm) but I'm really not sure if the crystal is that sensitive to external factors.
[attach=1]
I could do something like this to have a ground plane above the pro micro (blue) and have the rest of the pcb with the multi-zone layout, with each red zone having a different column value as that would make more use of the zones (see crudely annotated diagram). Either that or I just add a lot more vias to fill both sides with the ground planes despite only one component making use of the ground connection. Having said that the board does look better with both sides filled properly, it just adds so many more vias.
Front:
[attach=2]
Back:
[attach=3]
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Sun, 24 May 2020, 12:57:11
As long as you are not using hundreds of vias you don't need to think twice about it. Relative to the size of the board it is nothing.

Whether you should pour planes or not all over the board I can't really say. I recon it uses more etchant, but on the other hand I'm certain the copper will in turn be recycled by the board house, to their benefit is my guess.

I don't know if ground planes add any noise immunity or EMI benefits, but commercial boards don't seem to have any.
Title: Re: The Living PCB Design Thread
Post by: vvp on Mon, 25 May 2020, 02:43:03
I don't know if ground planes add any noise immunity or EMI benefits, but commercial boards don't seem to have any.
I think that is because switch contact "ringing" is much bigger when compared to ground/power plate shielding. One already needs to debounce because of switches and that takes care of EMI disturbances too. So they save copper by not using ground/power plates.
Title: Re: The Living PCB Design Thread
Post by: Thomas73951 on Mon, 25 May 2020, 16:05:39
As long as you are not using hundreds of vias you don't need to think twice about it. Relative to the size of the board it is nothing.
I initially saw vias as something that should be minimised as most of them can be removed with some clever placement of traces. The original design only had one via. But yeah it doesn't really matter that much.



I don't know if ground planes add any noise immunity or EMI benefits, but commercial boards don't seem to have any.
I think that is because switch contact "ringing" is much bigger when compared to ground/power plate shielding. One already needs to debounce because of switches and that takes care of EMI disturbances too. So they save copper by not using ground/power plates.

Whether you should pour planes or not all over the board I can't really say. I recon it uses more etchant, but on the other hand I'm certain the copper will in turn be recycled by the board house, to their benefit is my guess.

I guess I can just do whatever I think looks best then. Although I'm new to designing pcbs and (computer) keyboards, I have done a lot of other electronics projects, mostly on breadboard. When I made a synthesiser (with a voltage controlled oscillator). The keyboard it had was made on stripboard and quite basic. When a key was pressed it outputted a specific voltage with the maximum being 1v. I don't remember what I did to fix it, but I did have issues where putting my hand near the board would change the frequency of the note played and make a nasty buzzing sound. I was only affecting the signal out with a wave of amplitude around 30mV but it was enough interference to cause issues there.
I doubt anyone has ever had issues like that with a keyboard using a diode matrix. 
Title: Re: The Living PCB Design Thread
Post by: bpiphany on Tue, 26 May 2020, 00:44:35
Breadboards are notoriously bad for signal integrity though. You have long strips of antennas packed tightly together interacting both with each other and the surroundings. It's also easy to cheat and have a lot of floating inputs hooked up to those antennas when mocking things together on breadboard.
Title: Re: The Living PCB Design Thread
Post by: kelvinhall05 on Thu, 04 June 2020, 09:38:33
Hi guys, does anyone know what the voltage for Alps SKCL LEDs is? Just 5V? How do I connect it to a Pro Micro (one pin to ground, can the other pin just go to any controllable pin on the Pro Micro? I was thinking ironically enough to use the pins meant for the onboard LEDs as my matrix uses all the other pins)? Thanks!
Title: Re: The Living PCB Design Thread
Post by: pabile on Sun, 23 August 2020, 07:46:59
good day, gh. where do PWR_FLAG connects? I am trying to redo this schematics in easyeda hoping that i can understand it better https://github.com/joric/nrfmicro/releases/download/1.3/nrfmicro-1.3-schematic.pdf (https://github.com/joric/nrfmicro/releases/download/1.3/nrfmicro-1.3-schematic.pdf)

[attach=1]
Title: Re: The Living PCB Design Thread
Post by: hanya on Sun, 23 August 2020, 08:21:34
good day, gh. where do PWR_FLAG connects? I am trying to redo this schematics in easyeda hoping that i can understand it better ...
You need power symbol for power line such as VBUS and VOUT of the regulator. Then connect PWR_FLAG to the lines like for GND.
Title: Re: The Living PCB Design Thread
Post by: pabile on Sun, 23 August 2020, 08:43:49
You need power symbol for power line such as VBUS and VOUT of the regulator. Then connect PWR_FLAG to the lines like for GND.

thanks, hanya. follow up question...in the schematics i posted, PWR_FLAG is directly connected to GND. i think they should not be directly connected? should i disconnect it instead? apologies for my ignorance.

https://github.com/joric/nrfmicro/releases/download/1.3/nrfmicro-1.3-schematic.pdf
Title: Re: The Living PCB Design Thread
Post by: hanya on Mon, 24 August 2020, 21:56:45
thanks, hanya. follow up question...in the schematics i posted, PWR_FLAG is directly connected to GND. i think they should not be directly connected? should i disconnect it instead? apologies for my ignorance.
It is OK, you can connect where you want. I sometimes connect like that and put them near the corner of the sheet. Since the flags needs only by KiCAD.
Title: Re: The Living PCB Design Thread
Post by: pabile on Mon, 31 August 2020, 04:17:29
It is OK, you can connect where you want. I sometimes connect like that and put them near the corner of the sheet. Since the flags needs only by KiCAD.

thanks, hanya!
Title: Re: The Living PCB Design Thread
Post by: robotictomato on Sat, 12 September 2020, 16:33:59
Hello everyone - I'm pretty new to PCB design, but I wanted to try my hand at adding full backspace capability to the Arisu PCB by FateNozomi. I ran through a few tutorials from ai03, and given that the change was relatively minor went for it.

I would really appreciate it if someone with more experience would take a quick look and let me know if it looks alright, or if there is a better approach before I have PCBs cut.

I forked the original files and created a public repo on Github. You can find them here: https://github.com/andygunn/arisu-pcb-1.1-fb (https://github.com/andygunn/arisu-pcb-1.1-fb)

You can see the change here in the render:
[attachimg=1]
[attachimg=2]

I really appreciate it! Geekhack has been a great place to learn about all of this, thanks to you all.
Title: Re: The Living PCB Design Thread
Post by: coarse on Mon, 14 September 2020, 07:32:04
Hello everyone - I'm pretty new to PCB design, but I wanted to try my hand at adding full backspace capability to the Arisu PCB by FateNozomi. I ran through a few tutorials from ai03, and given that the change was relatively minor went for it.

I would really appreciate it if someone with more experience would take a quick look and let me know if it looks alright, or if there is a better approach before I have PCBs cut.

I forked the original files and created a public repo on Github. You can find them here: https://github.com/andygunn/arisu-pcb-1.1-fb (https://github.com/andygunn/arisu-pcb-1.1-fb)

You can see the change here in the render:

I really appreciate it! Geekhack has been a great place to learn about all of this, thanks to you all.
you missed out on the diode. it needs to be adjusted since its too close to the stabilizer hole
Title: Re: The Living PCB Design Thread
Post by: robotictomato on Mon, 14 September 2020, 08:41:06
you missed out on the diode. it needs to be adjusted since its too close to the stabilizer hole

Thank you. I did miss that. I will go back and fix that soon.

Does everything else look acceptable? Does the trace routing above the upper stabilizer holes look okay? I did have to cut out part of the pad on one of the switch contacts, but I have seen that before and I don't think it will cause an issue in either configuration (full backspace or split backspace).

I updated the diode position and adjusted a few traces:
[attach=1][attach=2]

The files are updated in Github if anyone wants to take a closer look.
Title: Re: The Living PCB Design Thread
Post by: Thomas73951 on Mon, 26 July 2021, 06:31:53
Hi, I've nearly finished my PCB, but I noticed something odd.

(https://i.imgur.com/COVorBY.png)


Looking at the gerber view of pcbway, it shows 2 sets of drill. Is this a problem or is it normal?

More images:

More
(https://i.imgur.com/b2qqIiv.png)(https://i.imgur.com/bwSxaUx.png)
Title: Re: The Living PCB Design Thread
Post by: Applet on Tue, 27 July 2021, 03:49:54
Hi, I've nearly finished my PCB, but I noticed something odd.

Show Image
(https://i.imgur.com/COVorBY.png)



Looking at the gerber view of pcbway, it shows 2 sets of drill. Is this a problem or is it normal?

More images:

More
Show Image
(https://i.imgur.com/b2qqIiv.png)
Show Image
(https://i.imgur.com/bwSxaUx.png)

This is normal, one set is plated holes, one set is non-plated holes  :D
Title: Re: The Living PCB Design Thread
Post by: Thomas73951 on Tue, 27 July 2021, 04:34:09
This is normal, one set is plated holes, one set is non-plated holes  :D

Ah ok, that makes sense.

Thank you :)
Title: Re: The Living PCB Design Thread
Post by: Thomas73951 on Fri, 30 July 2021, 10:58:51
I put a silkscreen decal on one side of the pcb, it covers most of the pcb. I'm not sure if it will cause any issues, it isn't covering any solder pads but it does cover a lot of plated holes. Will this cause issues with the holes?

(https://i.imgur.com/HOHeLFK.png)

(https://i.imgur.com/RgGdI9Q.png)
Title: Re: The Living PCB Design Thread
Post by: hanya on Fri, 30 July 2021, 17:58:10
I put a silkscreen decal on one side of the pcb, it covers most of the pcb. I'm not sure if it will cause any issues, it isn't covering any solder pads but it does cover a lot of plated holes. Will this cause issues with the holes?
Try "Subtract soldermask from silkscreen" option to plot gerber file. Then check the resulting gerber file with its viewer.
Title: Re: The Living PCB Design Thread
Post by: Thomas73951 on Sun, 01 August 2021, 08:37:14
Try "Subtract soldermask from silkscreen" option to plot gerber file. Then check the resulting gerber file with its viewer.

Awesome, that worked. Thank you :)
Title: Re: The Living PCB Design Thread
Post by: Solastice on Mon, 02 January 2023, 11:33:02
Hi! This is my first time making a pcb and first time posting on this thread. I need some advice on a few things.

I'm working on making a replacement PCB for my AEK II with an STM32 F3 MCU. The STM32F302ZDT6 to be precise, since it has enough I/O pins for 105 switches and USB. It should be compatible with QMK? The QMK Doc just says any STM32 MCU so I figure it should be.

I have all the basic power circuitry done. I have a reset button and switch for the MCU. The plan is to have the USB_C Ports on dummy boards that just pass through the signal to the main board. I have one port wired already.

 I just need advice on a few things, in order of priority:
1) How to implement ESD Protection

2) USB Pass through - the AEK has two ports and I want to keep the functionality of the second if I can. Is it enough to just hook up the second port to the same Data lines the other port uses? And what about the CC pins on the second, do I pull them down or not?

any advice is appreciated :D

Title: Re: The Living PCB Design Thread
Post by: Applet on Wed, 04 January 2023, 02:20:45
Is there a reason for doing it without a matrix? (just for fun is a good enough reason ;D ). It'll be more painful to route for no particular gain. You could then use a smaller MCU.

1: I'd recommend to check the datasheet for the ESD protection-chip you plan to use, implementation can vary slightly. Most often, you just connect the D+ and D-, VCC and GND to the ESD IC that sits in parallel, but some sit in series, so make sure to read the DS. Placement should be close to the connector and protect the traces between connector and MCU.

2: USB is not a bus, so you can't connect a second device to the same data-lines, you'll need a internal USB-hub or multiple data-lines (like multiple cables) to get pass-trough. Since you are using a USB connector and not a dedicated cable (that could split into two at the PC side), I'd go with a internal hub.

I'd also recommend to change voltage regulator to a more modern one and reduce the capacitance of it's decoupling caps. Ideally, you want to keep your total capacitance for a downstream usb-device to below 10uF.
Title: Re: The Living PCB Design Thread
Post by: Applet on Wed, 04 January 2023, 02:22:53
double post
Title: Re: The Living PCB Design Thread
Post by: xBqcon on Sun, 19 March 2023, 18:07:13
So I'm using ai03's guide and noticed there's a problem with the USB. I get the message "Processing courtyard of “random-keyboard-parts:Molex-0548190589”: Unable to find segment with an endpoint of (162,58 mm, 18,998 mm)" . I found one post saying to switch out the USB footprint. Does anyone know of any USB footprints to use? I also looked into a usb type C HRO TYPE-C-31-M-12 but not sure what the rest of the pins do besides the ground, power, D-, D+. I'm a noob if it isn't already clear so any help is appreciated. Thanks in advance!
Title: Re: The Living PCB Design Thread
Post by: Applet on Mon, 20 March 2023, 07:47:53
So I'm using ai03's guide and noticed there's a problem with the USB. I get the message "Processing courtyard of “random-keyboard-parts:Molex-0548190589”: Unable to find segment with an endpoint of (162,58 mm, 18,998 mm)" . I found one post saying to switch out the USB footprint. Does anyone know of any USB footprints to use? I also looked into a usb type C HRO TYPE-C-31-M-12 but not sure what the rest of the pins do besides the ground, power, D-, D+. I'm a noob if it isn't already clear so any help is appreciated. Thanks in advance!
The ai03 guide have a section that deals with how to implement USB-C: https://wiki.ai03.com/books/pcb-design/page/usb-type-c