Installing KiCad
The first step is to install KiCad and complete the additional online workspace setup instructions if you have not done so already.
Creating a Project in the KiCad Workspace
Open up KiCad and hit File->New Project
. Name the project FMRadio_[your kerb]
. Save the project to the local repository that you linked to the class GitHub Enterprise Organization during software setup named pcb-iap-2025-[your kerb]
. Check ‘Create a new folder for the project’ and save your new project.
On the left side of your KiCad window, you should now see your project and its respective kicad_sch
and kicad_pcb files
.
Introduction
This lab is a super simple, super short lab! It’s basically just to get you familiar with the following in KiCad.
- Project Structure
- Schematic Capture
Creating a Block Diagram
The first, most important step in putting our electrical system into a schematic is first creating the top-level schematic (or block diagram). This is like the system-level block diagram that was discussed in lecture 01 except that it contains more detail about how the electrical device will actually work and is located at the root of our schematic sheets.
Having this top-level schematic is crucial to ensuring that we can effectively keep the whole system structure of the FM radio in mind as we create it. Doing so also allows us to break down the schematic design into separate parts (e.g., amplifier, speakers, power), which makes our life a whole lot easier.
Top Level Schematic Sheet
Navigate to your FMRadio_[your kerb].kicad_sch
file. You should see a ‘Schematic Hierarchy’ sidebar pop up on the left. The Root
file will contain our top level block diagram. Now, we’re going to get started with building out this block diagram with all its different parts.
Hit Place->Sheet
(alternatively, you can use the shortcut S or click on the corresponding toolbar button which looks like a schematic square with a plus button) and draw a rectangle on your top level sheet. Afterwards, edit both the reference designator and file name to what block the sheet symbol is to represent. In this case, let’s have it be the FMReceiverChip
. (you may want to turn off the visibility for the sheetfile so the name doesn’t appear twice).
Now, we need to add ports to the block in order to connect it to other sheet symbols. In Altium, these ports are known as Hierarchical Labels
(or sheet pins) and can be found in the same dropdown as where we found the sheet symbols (or alternatively, can be accessed through the shortcut H or the button above the Add a Hierarchical Sheet button on the toolbar
).
Right now, we don’t know exactly what ports we need to have on each sheet symbol, and we don’t need to. We should, however, make sure we create the major connections and we can add additional sheet entries later on when we build out each block on the schematic.
For the FMReceiverChip
sheet, let’s add an antenna, speaker, and digital I/O port to it. Make sure to assign the I/O Type
of each label to Input
, Output
, and Bidirectional
, respectively. In KiCad, hierarchical labels need to be created in the child sheet and then imported into the parent sheet. So, to create these ports, click into your FMReceiverChip
sheet and place three hierarchical labels as described above. Don’t worry about connecting them to anything yet, just make sure they exist.
Then, navigate back to your Root
file, right-click on the FMReceiverChip
sheet, and hit Import Sheet Pin. Place all three pins on your sheet symbol.
With one block down, let’s complete the whole block diagram! Hopefully in doing so, you’ll get an intuitive understanding for how the whole FM radio will be set up.
Notice that we had to adjust the ports on the FMReceiverChip
to have two speaker output ports (one for the left and right speaker) since we want stereo audio. Building out these top-level diagrams/schematics helps us realize such discrepancies.
Also, with these sheet entries it becomes easy to duplicate identical circuits - without having to draw them out twice. Just copy and paste the sheet entry. Such is the case with the left and right stereo audio paths. KiCad will by default name the sheet with a new version (feel free to change it back by right-clicking on the sheet and going to Properties), but the Sheetfile name will be the same as the original.
Finally, notice how the Power
block is not connected to anything. In theory, since it is the power block, it should connect to every other block - but that would make the whole schematic quite messy. So instead, in KiCad (and all other EDA tools) power connections are considered global nets, which means that they connect to each other across the schematics and blocks without the need for explicit ports. This is just like how the GND symbol always implicitly connects to other GND symbols in a drawn schematic. Therefore, the power block just needs to exist and doesn’t need any ports.
We aren’t finished with the block diagram just yet. With each block or sheet, we abstract out lower-level block diagrams to simplify our schematics. We’ve done so with the antenna block, which is going to consist of some sheets within it.
Click into the Antenna
sheet and create blocks within the schematic named LowNoiseAmplifier
and MatchingNetwork
. We won’t connect them right now, but we will need to later.
Our Schematic Hierarchy toolbar ends up looking like below. Notice how sheets that present within other sheets are indented? This shows the hierarchy of the schematic sheets as provided by our top-level block diagram.
Filling in the Microcontroller
With all of our schematic sheets setup, we can begin filling them in. We’ll start small by doing a straightforward sheet: the microcontroller.
For the microcontroller, we’re using an ESP32, or more specifically the ESP32-C3-WROOM-02U-N4
, which comes as a module and handles a lot of the complicated supporting circuitry that’s required for a microcontroller. However! We still need to do some circuit layout ourselves for the ESP32 within the Microcontroller
sheet.
While KiCad’s default library comes with an extensive set of built in parts, it does not include a few of the components we will need for our Microcontroller
schematic. For the rest of this class, we will wrap these unincluded components into a custom library that you can directly import. However, for this lab, we will have you manually add them since there are only three. To add the required parts, download the FMRadioLab01Parts
file below, unzip it, and place it in your repository (it should be alongside your project folder, not in your project folder).
Now, we need to add the symbols and footprints of these components to our project. To do so, first navigate to Preferences → Manage Symbol Libraries. Switch to Project Specific Libraries, and hit the Folder icon in the bottom left. Navigate to the FMRadioLab01Parts
folder and the .kicad_sym
files of the three components one by one. When you’re done, the Project Specific Libraries tab should look like this:
Now we have to add footprints to these components (they will be used when we start layout). To do so, switch over to the overarching project’s .kicad_pcb
file. Go to Preferences->Manage Footprint Libraries
. Repeat the same process for symbols, but for each part, add the whole parts folder and not just one file this time. KiCad will parse the files in the folder for the .kicad_mod
file, and use that for the footprint. When you’re done, the Project Specific Libraries tab should look like this:
Finally, we have to actually link the corresponding footprints and symbols. Go back to your project’s .kicad_sch
file, and add each of the three symbols (either by going to Place->Add Symbol
or using the A shortcut). For example:
Once the symbols are on your schematic, go to Tools->Assign
Footprints. One by one, click on each part, find the corresponding footprint library on the left, and double-click the footprint from the Filtered Footprints sidebar to assign the footprint to the symbol. The FSMSM
pushbutton switch is highlighted below to show an example of the workflow. Once you’re done, your window should look like the image below.
Wonderful! We’re now ready to fill in our schematic.
Following the Datasheet
Taking a look at the typical application circuit in the ESP32-C3-02U datasheet, draw out the schematic for the microcontroller. From the typical application circuit, you should exclude the components with the following reference designators1 and their corresponding connections:
- JP1 and JP2
- JP4
- R3
- R5
- R8 and R9
- R7
- X1
- C5 through C8
Use the following components from the Components Panel
for the following reference designators:
Ref Des | Component Name |
---|---|
JP3 | 12402012E212A |
SW1 | FSMSM |
R1 | 0603 10 kOhm Resistor |
C3 | 0603 100nF Capacitor |
JP3
in particular is a USB-C recepticle, so there are some additional connections that you will need to make in addition to connecting it to the microcontroller:
- Attach a global power net to the two
VBUS
pins and name the global power net:VUSB
. We’ll use this later to draw power from the USB-C connection - In order to control the amount of current that flows through the USB-C connection, the USB-C standard utilizes current-control resistor (CC) in order to communicate how much current a device should be provided. In the case of this FM radio, we want the maximum current that can be provided over a USB connection (about 1 A). To do so, place a shunt 5.1 kOhm resistor on each of the CC pins.
- The shield should always been connected to ground.
- Basic USB 2.0 communication (which is what we’ll be using to program the microcontroller) occurs over a bidirectional data line that is configured as a differential pair, which we’ll explain more about in the upcoming lectures. For now, we just need to make sure that we specify the two USB data (D) pins as a differential pair. To do so, attach a net label named
USB_D_N
andUSB_D_P
to the respective sets of pins onJP3
. The combonation of the_N
and_P
tells KiCad that the USB data lines are a differential pair, which is important for later.
Conclusion
Congratulations on completing the first lab! You have create a full top-level schematic and began building out one of its blocks, the microcontroller.
Be sure to save to commit to main and push to origin so that your local changes get saved to your GitHub repository! Please do so by midnight so that course staff can grade your work.
-
The reference designator is the letter-number combination above a part on the schematic. They appear on the schematic, on the PCB itself, and in the bill-of-materials. This makes it really easy to identify components in a PCB. Each component should have a unique designator. Typical letters include: “C” stands for “capacitor”, “D” stands for “diode”, “L” is for “inductor”, “R” is for “resistor”, “P” is a connector of some sort, and “U” is a surface mount chip. Typical examples will be
U1
orR4
andR14
. ↩