![pcb design pcb design](https://3yq5q42rw3z48qnbj46yehrx-wpengine.netdna-ssl.com/wp-content/uploads/process-sized.jpg)
For our example board, we'll use PF0 for row0, PF1 for row1, PF4 for col0, and PF5 for col1:įinally, let's label all the unused pins as not connected. We'll use labels for ease (A with a green line underneath on the right). Now we want to connect this matrix to the controller. K1 should correspond to D1, K2 should correspond to D2, and so on: Just connect them like you would a handwired board, and don't forget to name them. We're going to want to use the KEYSW and D components for our switch and diode components, respectively. For the purposes of this guide, we're simply making a nice and easy 2x2 matrix. Here's what everything look like at this point: Normally, you would place a capacitor between AVCC and VCC if you were using the built-in ADC (analog to digital converter), but we don't care about that for a keyboard, so just directly connect them. Let's connect all the VCC connections together and all the GND connections together. And lastly, put a 1uF capacitor C8 between UCap and GND: Connect GND and SHIELD together and connect them to ground. Connect VUSB to VCC and Uvcc, and put two 22 ohm resistors R3 and R4 between the D- and D+ connections. Add the USB_mini_micro_B component from the keyboard_parts library and call it J1. We want a resistor here because it tells the microcontroller that when we press the reset button, we want to go into the bootloader so that we can flash a new layout onto it! Now let's put a 10k resistor named R2 on HWB/PE2 pin and connect it to ground.
![pcb design pcb design](https://www.eurocircuits.com/wp-content/uploads/PCB-DM-2019-Social-Media-web.jpg)
But for now, here's how it should be hooked up: If you want to know why we want a pullup resistor and what a pullup resistor even means, here is a good explanation from Sparkfun. For this, you'll want a switch ( SW_PUSH) named SW1 and a 10k resistor for pullup ( R) named R1. In our case, we want 4 0.1uF capacitors and 1 4.7uF capacitor, like so: We will generally want one 0.1uF capacitor for each VCC/AVCC on the controller and one 4.7uF capacitor for UVcc. Next, we'll add decoupling capacitors for VCC, our power source. Also add a GND symbol to represent ground, and connect everything using the wire tool (green line on the right) like so: Name them C1 and C2, and change their values to 22p. There's a formula for determining the capacitance you need for these capacitors, but for now, we'll use a crystal with 18pF load capacitance, so these decoupling capacitors will be 22pF. These capacitors will basically help prevent the signal to the controller from accumulating too much noise. Next, we're going to want to add 2 decoupling capacitors ( C_SMALL). Look for the XTAL_GND component and place it next to the controller. The next part we'll want to place is the crystal, which is the part that tells the controller how fast to run. This is the unique name that we're going to use to refer to this particular component. Edit the component and change the reference from "U?" to "U1". Look for ATMEGA32U4 in the keyboard_parts library:Ĭlick OK, then click on the schematic sheet again to place the component. G: drag the component up and move it while keeping wires attached to itĭo Place > Component. To start off, here's a list of basic commands: We're about to get real technical here, so buckle up. We want to move that to the top of the list, so your list should look like this:Ĭlick "OK" and we're ready to go. Scroll down to the bottom of the component library list and find the library you just added. Then, click on "Add" and find the keyboard_parts.lib file from Hasu's library. At the top of the window, click on Preferences > Component Libraries. sch file and you should be greeted with an empty schematic sheet: For the purposes of this guide, I'll be calling it "example". Start up KiCad and create a new project (File > New Project > New Project). Those should be included with your KiCad installation. Make sure you also have the official KiCad libraries as well. u/techieee also has a good switch footprint library.ĭownload all of these and we should be good to go! I like to use Hasu's keyboard_parts component library and footprint library.
![pcb design pcb design](https://static.wixstatic.com/media/f8788f_38aebdf8920c473388f18da850096ae9~mv2.jpg)
PCB DESIGN INSTALL
Download it, install it, and you should be ready to go!
PCB DESIGN HOW TO
So you want to make a PCB for a keyboard? Don't know where or how to start? Well you've come to the right place! Table of Contents