PCB Guide Part 3 - Creating the MCU schematic

By this point, you should have installed the programs, created the repository, and added the local libraries.

Step 5. Beginning the schematic

The schematic is used to set up the electronics side of things.

For this tutorial, we will be using the typical Atmega32u4 microcontroller, and building a 2x2 macropad with MX and Alps support.

Open up the schematic editor to begin.

From Ruiqi Mao's PCB guide, here is a nice commands reference:

m: pick the component up and move it
g: drag the component up and move it while keeping wires attached to it
c: copy the component
e: edit the component
r: rotate the component
y: mirror the component
del: delete the component
esc: abort!

Also, these shortcuts are useful to know:

w - Begin drawing a wire connection
k - Cut a wire and stop drawing it without clicking on an endpoint
Ctrl + h - Place a global net

 

The microcontroller, or MCU for short, is the brain of the PCB.
It cannot function on its own, so we will build the circuit for it.

First, press A to open the "add symbol" menu, and search for atmega32u4.

Select the atmega32u4-au component.

Place it down in the schematic.

To set it up, we will simply follow two resources:

Usually, both a technical datasheet and an existing implementation will exist for most components.
Search for both, and use both as reference.

To begin, let's tie UVCC, VCC, and AVCC to +5V, as specified by the datasheet.
Hit P to open the power symbols menu, and select the +5V symbol.

Place it above the VCC pins. If you misplace, you can move it by hovering over the component and pressing M.

Now, wire it together using the wire tool (hotkey W).

This binds the physical UVCC/VCC/AVCC pins on the component to the +5V net.
Net refers to a set of pads that should all be connected together.

Similarly, bind the GND and UGND pins to Ground by selecting the GND symbol in the power menu and wiring them together.

Protip: It is good practice to have positive power source symbols pointing up, and ground power symbols pointing down.

Now we will place some components.

The HWB pin requires a pull-down resistor, or a resistor connected to ground.
Open the components menu with A, and search for r_small, or the small resistor component (The large one is massive and will burn space on the schematic):

Now, place this parallel to the pin labeled HWB/PE2. You can rotate the component by pressing R.

Also, place a ground symbol.

Now, wire it together.

Congratulations, now the PE2 pin is connected to ground through the resistor.

Let's change the value of the resistor. Press the E key while hovering over the resistor to edit.
A 10k ohm resistor is fit for this task. Select the value field, and type 10k.